2016-05-16 16:49:15 +00:00
|
|
|
# Copyright 2015 Google Inc.
|
|
|
|
#
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
# you may not use this file except in compliance with the License.
|
|
|
|
# You may obtain a copy of the License at
|
|
|
|
#
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
# limitations under the License.
|
|
|
|
|
|
|
|
require '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 SheetsV4
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Adds a new banded range to the spreadsheet.
|
|
|
|
class AddBandingRequest
|
2016-05-16 16:49:15 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# A banded (alternating colors) range in a sheet.
|
|
|
|
# Corresponds to the JSON property `bandedRange`
|
|
|
|
# @return [Google::Apis::SheetsV4::BandedRange]
|
|
|
|
attr_accessor :banded_range
|
2016-05-16 16:49:15 +00:00
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@banded_range = args[:banded_range] if args.key?(:banded_range)
|
2016-05-16 16:49:15 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The result of adding a banded range.
|
|
|
|
class AddBandingResponse
|
2016-05-16 16:49:15 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# A banded (alternating colors) range in a sheet.
|
|
|
|
# Corresponds to the JSON property `bandedRange`
|
|
|
|
# @return [Google::Apis::SheetsV4::BandedRange]
|
|
|
|
attr_accessor :banded_range
|
2017-03-10 21:11:09 +00:00
|
|
|
|
2017-02-03 19:29:28 +00:00
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@banded_range = args[:banded_range] if args.key?(:banded_range)
|
2017-02-03 19:29:28 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Adds a chart to a sheet in the spreadsheet.
|
|
|
|
class AddChartRequest
|
2017-02-03 19:29:28 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# A chart embedded in a sheet.
|
|
|
|
# Corresponds to the JSON property `chart`
|
|
|
|
# @return [Google::Apis::SheetsV4::EmbeddedChart]
|
|
|
|
attr_accessor :chart
|
2017-07-12 20:10:42 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
2017-07-12 20:10:42 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@chart = args[:chart] if args.key?(:chart)
|
|
|
|
end
|
|
|
|
end
|
2017-07-12 20:10:42 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The result of adding a chart to a spreadsheet.
|
|
|
|
class AddChartResponse
|
|
|
|
include Google::Apis::Core::Hashable
|
2017-07-12 20:10:42 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# A chart embedded in a sheet.
|
|
|
|
# Corresponds to the JSON property `chart`
|
|
|
|
# @return [Google::Apis::SheetsV4::EmbeddedChart]
|
|
|
|
attr_accessor :chart
|
2016-05-16 16:49:15 +00:00
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@chart = args[:chart] if args.key?(:chart)
|
2016-05-16 16:49:15 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# Adds a new conditional format rule at the given index. All subsequent rules'
|
|
|
|
# indexes are incremented.
|
2017-08-25 19:54:22 +00:00
|
|
|
class AddConditionalFormatRuleRequest
|
2016-05-16 16:49:15 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The zero-based index where the rule should be inserted.
|
|
|
|
# Corresponds to the JSON property `index`
|
2017-07-12 20:10:42 +00:00
|
|
|
# @return [Fixnum]
|
2017-08-25 19:54:22 +00:00
|
|
|
attr_accessor :index
|
2017-07-12 20:10:42 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# A rule describing a conditional format.
|
|
|
|
# Corresponds to the JSON property `rule`
|
|
|
|
# @return [Google::Apis::SheetsV4::ConditionalFormatRule]
|
|
|
|
attr_accessor :rule
|
2017-03-30 22:30:51 +00:00
|
|
|
|
|
|
|
def initialize(**args)
|
2017-03-27 22:14:47 +00:00
|
|
|
update!(**args)
|
|
|
|
end
|
2016-05-16 16:49:15 +00:00
|
|
|
|
2017-03-27 22:14:47 +00:00
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@index = args[:index] if args.key?(:index)
|
|
|
|
@rule = args[:rule] if args.key?(:rule)
|
2017-03-27 22:14:47 +00:00
|
|
|
end
|
|
|
|
end
|
2016-05-16 16:49:15 +00:00
|
|
|
|
2020-08-28 00:38:58 +00:00
|
|
|
# Adds a data source. After the data source is added successfully, an associated
|
2020-09-29 00:38:39 +00:00
|
|
|
# DATA_SOURCE sheet is created and an execution is triggered to refresh the
|
|
|
|
# sheet to read data from the data source. The request requires an additional `
|
|
|
|
# bigquery.readonly` OAuth scope.
|
2020-08-28 00:38:58 +00:00
|
|
|
class AddDataSourceRequest
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
|
|
|
# Information about an external data source in the spreadsheet.
|
|
|
|
# Corresponds to the JSON property `dataSource`
|
|
|
|
# @return [Google::Apis::SheetsV4::DataSource]
|
|
|
|
attr_accessor :data_source
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@data_source = args[:data_source] if args.key?(:data_source)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
# The result of adding a data source.
|
|
|
|
class AddDataSourceResponse
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2020-09-29 00:38:39 +00:00
|
|
|
# The data execution status. A data execution is created to sync a data source
|
|
|
|
# object with the latest data from a DataSource. It is usually scheduled to run
|
|
|
|
# at background, you can check its state to tell if an execution completes There
|
|
|
|
# are several scenarios where a data execution is triggered to run: * Adding a
|
|
|
|
# data source creates an associated data source sheet as well as a data
|
|
|
|
# execution to sync the data from the data source to the sheet. * Updating a
|
|
|
|
# data source creates a data execution to refresh the associated data source
|
|
|
|
# sheet similarly. * You can send refresh request to explicitly refresh one or
|
|
|
|
# multiple data source objects.
|
2020-08-28 00:38:58 +00:00
|
|
|
# Corresponds to the JSON property `dataExecutionStatus`
|
|
|
|
# @return [Google::Apis::SheetsV4::DataExecutionStatus]
|
|
|
|
attr_accessor :data_execution_status
|
|
|
|
|
|
|
|
# Information about an external data source in the spreadsheet.
|
|
|
|
# Corresponds to the JSON property `dataSource`
|
|
|
|
# @return [Google::Apis::SheetsV4::DataSource]
|
|
|
|
attr_accessor :data_source
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@data_execution_status = args[:data_execution_status] if args.key?(:data_execution_status)
|
|
|
|
@data_source = args[:data_source] if args.key?(:data_source)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# Creates a group over the specified range. If the requested range is a superset
|
|
|
|
# of the range of an existing group G, then the depth of G is incremented and
|
|
|
|
# this new group G' has the depth of that group. For example, a group [C:D,
|
|
|
|
# depth 1] + [B:E] results in groups [B:E, depth 1] and [C:D, depth 2]. If the
|
|
|
|
# requested range is a subset of the range of an existing group G, then the
|
|
|
|
# depth of the new group G' becomes one greater than the depth of G. For example,
|
|
|
|
# a group [B:E, depth 1] + [C:D] results in groups [B:E, depth 1] and [C:D,
|
|
|
|
# depth 2]. If the requested range starts before and ends within, or starts
|
|
|
|
# within and ends after, the range of an existing group G, then the range of the
|
|
|
|
# existing group G becomes the union of the ranges, and the new group G' has
|
2018-05-08 00:35:49 +00:00
|
|
|
# depth one greater than the depth of G and range as the intersection of the
|
|
|
|
# ranges. For example, a group [B:D, depth 1] + [C:E] results in groups [B:E,
|
|
|
|
# depth 1] and [C:D, depth 2].
|
|
|
|
class AddDimensionGroupRequest
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# A range along a single dimension on a sheet. All indexes are zero-based.
|
|
|
|
# Indexes are half open: the start index is inclusive and the end index is
|
|
|
|
# exclusive. Missing indexes indicate the range is unbounded on that side.
|
2018-05-08 00:35:49 +00:00
|
|
|
# Corresponds to the JSON property `range`
|
|
|
|
# @return [Google::Apis::SheetsV4::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
|
|
|
|
|
|
|
|
# The result of adding a group.
|
|
|
|
class AddDimensionGroupResponse
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
|
|
|
# All groups of a dimension after adding a group to that dimension.
|
|
|
|
# Corresponds to the JSON property `dimensionGroups`
|
|
|
|
# @return [Array<Google::Apis::SheetsV4::DimensionGroup>]
|
|
|
|
attr_accessor :dimension_groups
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@dimension_groups = args[:dimension_groups] if args.key?(:dimension_groups)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Adds a filter view.
|
|
|
|
class AddFilterViewRequest
|
2017-03-27 22:14:47 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
2016-05-16 16:49:15 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# A filter view.
|
|
|
|
# Corresponds to the JSON property `filter`
|
|
|
|
# @return [Google::Apis::SheetsV4::FilterView]
|
|
|
|
attr_accessor :filter
|
2017-02-13 23:28:52 +00:00
|
|
|
|
2017-03-27 22:14:47 +00:00
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
2017-02-13 23:28:52 +00:00
|
|
|
|
2017-03-27 22:14:47 +00:00
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@filter = args[:filter] if args.key?(:filter)
|
2017-03-27 22:14:47 +00:00
|
|
|
end
|
|
|
|
end
|
2017-02-13 23:28:52 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The result of adding a filter view.
|
|
|
|
class AddFilterViewResponse
|
2017-03-27 22:14:47 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# A filter view.
|
|
|
|
# Corresponds to the JSON property `filter`
|
|
|
|
# @return [Google::Apis::SheetsV4::FilterView]
|
|
|
|
attr_accessor :filter
|
2016-11-08 23:43:14 +00:00
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@filter = args[:filter] if args.key?(:filter)
|
2016-11-08 23:43:14 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Adds a named range to the spreadsheet.
|
|
|
|
class AddNamedRangeRequest
|
2017-01-28 03:38:40 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# A named range.
|
|
|
|
# Corresponds to the JSON property `namedRange`
|
|
|
|
# @return [Google::Apis::SheetsV4::NamedRange]
|
|
|
|
attr_accessor :named_range
|
2017-06-14 17:02:03 +00:00
|
|
|
|
2017-04-03 20:18:48 +00:00
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@named_range = args[:named_range] if args.key?(:named_range)
|
2017-03-10 21:11:09 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The result of adding a named range.
|
|
|
|
class AddNamedRangeResponse
|
2017-05-26 16:44:32 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# A named range.
|
|
|
|
# Corresponds to the JSON property `namedRange`
|
|
|
|
# @return [Google::Apis::SheetsV4::NamedRange]
|
|
|
|
attr_accessor :named_range
|
2017-05-26 16:44:32 +00:00
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@named_range = args[:named_range] if args.key?(:named_range)
|
2017-05-26 16:44:32 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Adds a new protected range.
|
|
|
|
class AddProtectedRangeRequest
|
2017-05-26 16:44:32 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# A protected range.
|
|
|
|
# Corresponds to the JSON property `protectedRange`
|
|
|
|
# @return [Google::Apis::SheetsV4::ProtectedRange]
|
|
|
|
attr_accessor :protected_range
|
2017-05-26 16:44:32 +00:00
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@protected_range = args[:protected_range] if args.key?(:protected_range)
|
2017-05-26 16:44:32 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The result of adding a new protected range.
|
|
|
|
class AddProtectedRangeResponse
|
2017-05-26 16:44:32 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
2017-03-31 19:53:27 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# A protected range.
|
|
|
|
# Corresponds to the JSON property `protectedRange`
|
|
|
|
# @return [Google::Apis::SheetsV4::ProtectedRange]
|
|
|
|
attr_accessor :protected_range
|
2017-05-26 16:44:32 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
2017-06-02 06:11:31 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@protected_range = args[:protected_range] if args.key?(:protected_range)
|
|
|
|
end
|
|
|
|
end
|
2017-05-26 16:44:32 +00:00
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# Adds a new sheet. When a sheet is added at a given index, all subsequent
|
|
|
|
# sheets' indexes are incremented. To add an object sheet, use AddChartRequest
|
|
|
|
# instead and specify EmbeddedObjectPosition.sheetId or EmbeddedObjectPosition.
|
|
|
|
# newSheet.
|
2017-08-25 19:54:22 +00:00
|
|
|
class AddSheetRequest
|
|
|
|
include Google::Apis::Core::Hashable
|
2016-05-16 16:49:15 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Properties of a sheet.
|
|
|
|
# Corresponds to the JSON property `properties`
|
|
|
|
# @return [Google::Apis::SheetsV4::SheetProperties]
|
|
|
|
attr_accessor :properties
|
2016-05-16 16:49:15 +00:00
|
|
|
|
2017-07-12 20:10:42 +00:00
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
2016-05-16 16:49:15 +00:00
|
|
|
|
2017-07-12 20:10:42 +00:00
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@properties = args[:properties] if args.key?(:properties)
|
2017-07-12 20:10:42 +00:00
|
|
|
end
|
|
|
|
end
|
2016-05-16 16:49:15 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The result of adding a sheet.
|
|
|
|
class AddSheetResponse
|
2017-07-12 20:10:42 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
2017-06-02 06:11:31 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Properties of a sheet.
|
|
|
|
# Corresponds to the JSON property `properties`
|
|
|
|
# @return [Google::Apis::SheetsV4::SheetProperties]
|
|
|
|
attr_accessor :properties
|
2016-05-16 16:49:15 +00:00
|
|
|
|
2017-07-12 20:10:42 +00:00
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
2017-03-27 22:14:47 +00:00
|
|
|
|
2017-07-12 20:10:42 +00:00
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@properties = args[:properties] if args.key?(:properties)
|
2017-07-12 20:10:42 +00:00
|
|
|
end
|
|
|
|
end
|
2017-01-25 07:37:13 +00:00
|
|
|
|
2019-11-05 00:36:31 +00:00
|
|
|
# Adds a slicer to a sheet in the spreadsheet.
|
|
|
|
class AddSlicerRequest
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
|
|
|
# A slicer in a sheet.
|
|
|
|
# Corresponds to the JSON property `slicer`
|
|
|
|
# @return [Google::Apis::SheetsV4::Slicer]
|
|
|
|
attr_accessor :slicer
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@slicer = args[:slicer] if args.key?(:slicer)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
# The result of adding a slicer to a spreadsheet.
|
|
|
|
class AddSlicerResponse
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
|
|
|
# A slicer in a sheet.
|
|
|
|
# Corresponds to the JSON property `slicer`
|
|
|
|
# @return [Google::Apis::SheetsV4::Slicer]
|
|
|
|
attr_accessor :slicer
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@slicer = args[:slicer] if args.key?(:slicer)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# Adds new cells after the last row with data in a sheet, inserting new rows
|
|
|
|
# into the sheet if necessary.
|
2017-08-25 19:54:22 +00:00
|
|
|
class AppendCellsRequest
|
2017-07-12 20:10:42 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
2017-05-26 16:44:32 +00:00
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The fields of CellData that should be updated. At least one field must be
|
|
|
|
# specified. The root is the CellData; 'row.values.' should not be specified. A
|
|
|
|
# single `"*"` can be used as short-hand for listing every field.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `fields`
|
2017-07-12 20:10:42 +00:00
|
|
|
# @return [String]
|
2017-08-25 19:54:22 +00:00
|
|
|
attr_accessor :fields
|
2017-05-26 16:44:32 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The data to append.
|
|
|
|
# Corresponds to the JSON property `rows`
|
|
|
|
# @return [Array<Google::Apis::SheetsV4::RowData>]
|
|
|
|
attr_accessor :rows
|
2017-05-26 16:44:32 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The sheet ID to append the data to.
|
|
|
|
# Corresponds to the JSON property `sheetId`
|
|
|
|
# @return [Fixnum]
|
|
|
|
attr_accessor :sheet_id
|
2017-05-26 16:44:32 +00:00
|
|
|
|
2017-07-12 20:10:42 +00:00
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
2017-05-04 19:35:56 +00:00
|
|
|
|
2017-07-12 20:10:42 +00:00
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@fields = args[:fields] if args.key?(:fields)
|
|
|
|
@rows = args[:rows] if args.key?(:rows)
|
|
|
|
@sheet_id = args[:sheet_id] if args.key?(:sheet_id)
|
2017-07-12 20:10:42 +00:00
|
|
|
end
|
|
|
|
end
|
2017-05-04 19:35:56 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Appends rows or columns to the end of a sheet.
|
|
|
|
class AppendDimensionRequest
|
2017-07-12 20:10:42 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
2017-05-04 19:35:56 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Whether rows or columns should be appended.
|
2017-07-12 20:10:42 +00:00
|
|
|
# Corresponds to the JSON property `dimension`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :dimension
|
2017-05-26 16:44:32 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The number of rows or columns to append.
|
|
|
|
# Corresponds to the JSON property `length`
|
2017-07-12 20:10:42 +00:00
|
|
|
# @return [Fixnum]
|
2017-08-25 19:54:22 +00:00
|
|
|
attr_accessor :length
|
2017-05-26 16:44:32 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The sheet to append rows or columns to.
|
2017-07-12 20:10:42 +00:00
|
|
|
# Corresponds to the JSON property `sheetId`
|
|
|
|
# @return [Fixnum]
|
|
|
|
attr_accessor :sheet_id
|
2017-05-26 16:44:32 +00:00
|
|
|
|
2017-07-12 20:10:42 +00:00
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
2017-01-25 07:37:13 +00:00
|
|
|
|
2017-07-12 20:10:42 +00:00
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@dimension = args[:dimension] if args.key?(:dimension)
|
2017-08-25 19:54:22 +00:00
|
|
|
@length = args[:length] if args.key?(:length)
|
2017-07-12 20:10:42 +00:00
|
|
|
@sheet_id = args[:sheet_id] if args.key?(:sheet_id)
|
|
|
|
end
|
|
|
|
end
|
2016-05-16 16:49:15 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The response when updating a range of values in a spreadsheet.
|
|
|
|
class AppendValuesResponse
|
2017-07-12 20:10:42 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
2017-01-28 03:38:40 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The spreadsheet the updates were applied to.
|
|
|
|
# Corresponds to the JSON property `spreadsheetId`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :spreadsheet_id
|
2017-01-28 03:38:40 +00:00
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The range (in A1 notation) of the table that values are being appended to (
|
|
|
|
# before the values were appended). Empty if no table was found.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `tableRange`
|
2017-07-12 20:10:42 +00:00
|
|
|
# @return [String]
|
2017-08-25 19:54:22 +00:00
|
|
|
attr_accessor :table_range
|
|
|
|
|
|
|
|
# The response when updating a range of values in a spreadsheet.
|
|
|
|
# Corresponds to the JSON property `updates`
|
|
|
|
# @return [Google::Apis::SheetsV4::UpdateValuesResponse]
|
|
|
|
attr_accessor :updates
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@spreadsheet_id = args[:spreadsheet_id] if args.key?(:spreadsheet_id)
|
|
|
|
@table_range = args[:table_range] if args.key?(:table_range)
|
|
|
|
@updates = args[:updates] if args.key?(:updates)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
# Fills in more data based on existing data.
|
|
|
|
class AutoFillRequest
|
|
|
|
include Google::Apis::Core::Hashable
|
2017-06-14 17:02:03 +00:00
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# A range on a sheet. All indexes are zero-based. Indexes are half open, i.e.
|
|
|
|
# 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 sheet 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!`.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `range`
|
2017-07-12 20:10:42 +00:00
|
|
|
# @return [Google::Apis::SheetsV4::GridRange]
|
2017-08-25 19:54:22 +00:00
|
|
|
attr_accessor :range
|
2017-07-12 20:10:42 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# A combination of a source range and how to extend that source.
|
|
|
|
# Corresponds to the JSON property `sourceAndDestination`
|
|
|
|
# @return [Google::Apis::SheetsV4::SourceAndDestination]
|
|
|
|
attr_accessor :source_and_destination
|
2017-06-14 17:02:03 +00:00
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# True if we should generate data with the "alternate" series. This differs
|
|
|
|
# based on the type and amount of source data.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `useAlternateSeries`
|
|
|
|
# @return [Boolean]
|
|
|
|
attr_accessor :use_alternate_series
|
|
|
|
alias_method :use_alternate_series?, :use_alternate_series
|
2017-06-14 17:02:03 +00:00
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@range = args[:range] if args.key?(:range)
|
|
|
|
@source_and_destination = args[:source_and_destination] if args.key?(:source_and_destination)
|
|
|
|
@use_alternate_series = args[:use_alternate_series] if args.key?(:use_alternate_series)
|
2017-06-14 17:02:03 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# Automatically resizes one or more dimensions based on the contents of the
|
|
|
|
# cells in that dimension.
|
2017-07-12 20:10:42 +00:00
|
|
|
class AutoResizeDimensionsRequest
|
2017-06-14 17:02:03 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2020-09-29 00:38:39 +00:00
|
|
|
# A range along a single dimension on a DATA_SOURCE sheet.
|
2020-08-28 00:38:58 +00:00
|
|
|
# Corresponds to the JSON property `dataSourceSheetDimensions`
|
|
|
|
# @return [Google::Apis::SheetsV4::DataSourceSheetDimensionRange]
|
|
|
|
attr_accessor :data_source_sheet_dimensions
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# A range along a single dimension on a sheet. All indexes are zero-based.
|
|
|
|
# Indexes are half open: the start index is inclusive and the end index is
|
|
|
|
# exclusive. Missing indexes indicate the range is unbounded on that side.
|
2017-07-12 20:10:42 +00:00
|
|
|
# Corresponds to the JSON property `dimensions`
|
|
|
|
# @return [Google::Apis::SheetsV4::DimensionRange]
|
|
|
|
attr_accessor :dimensions
|
2017-06-14 17:02:03 +00:00
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2020-08-28 00:38:58 +00:00
|
|
|
@data_source_sheet_dimensions = args[:data_source_sheet_dimensions] if args.key?(:data_source_sheet_dimensions)
|
2017-07-12 20:10:42 +00:00
|
|
|
@dimensions = args[:dimensions] if args.key?(:dimensions)
|
2017-06-14 17:02:03 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# A banded (alternating colors) range in a sheet.
|
|
|
|
class BandedRange
|
2017-06-14 17:02:03 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The id of the banded range.
|
|
|
|
# Corresponds to the JSON property `bandedRangeId`
|
|
|
|
# @return [Fixnum]
|
|
|
|
attr_accessor :banded_range_id
|
2017-06-14 17:02:03 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Properties referring a single dimension (either row or column). If both
|
2020-08-18 00:38:22 +00:00
|
|
|
# BandedRange.row_properties and BandedRange.column_properties are set, the fill
|
|
|
|
# colors are applied to cells according to the following rules: * header_color
|
|
|
|
# and footer_color take priority over band colors. * first_band_color takes
|
|
|
|
# priority over second_band_color. * row_properties takes priority over
|
|
|
|
# column_properties. For example, the first row color takes priority over the
|
|
|
|
# first column color, but the first column color takes priority over the second
|
|
|
|
# row color. Similarly, the row header takes priority over the column header in
|
|
|
|
# the top left cell, but the column header takes priority over the first row
|
2017-08-25 19:54:22 +00:00
|
|
|
# color if the row header is not set.
|
|
|
|
# Corresponds to the JSON property `columnProperties`
|
|
|
|
# @return [Google::Apis::SheetsV4::BandingProperties]
|
|
|
|
attr_accessor :column_properties
|
2017-06-14 17:02:03 +00:00
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# A range on a sheet. All indexes are zero-based. Indexes are half open, i.e.
|
|
|
|
# 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 sheet 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!`.
|
2017-07-12 20:10:42 +00:00
|
|
|
# Corresponds to the JSON property `range`
|
|
|
|
# @return [Google::Apis::SheetsV4::GridRange]
|
|
|
|
attr_accessor :range
|
2017-06-14 17:02:03 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Properties referring a single dimension (either row or column). If both
|
2020-08-18 00:38:22 +00:00
|
|
|
# BandedRange.row_properties and BandedRange.column_properties are set, the fill
|
|
|
|
# colors are applied to cells according to the following rules: * header_color
|
|
|
|
# and footer_color take priority over band colors. * first_band_color takes
|
|
|
|
# priority over second_band_color. * row_properties takes priority over
|
|
|
|
# column_properties. For example, the first row color takes priority over the
|
|
|
|
# first column color, but the first column color takes priority over the second
|
|
|
|
# row color. Similarly, the row header takes priority over the column header in
|
|
|
|
# the top left cell, but the column header takes priority over the first row
|
2017-08-25 19:54:22 +00:00
|
|
|
# color if the row header is not set.
|
|
|
|
# Corresponds to the JSON property `rowProperties`
|
|
|
|
# @return [Google::Apis::SheetsV4::BandingProperties]
|
|
|
|
attr_accessor :row_properties
|
2017-06-14 17:02:03 +00:00
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@banded_range_id = args[:banded_range_id] if args.key?(:banded_range_id)
|
|
|
|
@column_properties = args[:column_properties] if args.key?(:column_properties)
|
2017-07-12 20:10:42 +00:00
|
|
|
@range = args[:range] if args.key?(:range)
|
2017-08-25 19:54:22 +00:00
|
|
|
@row_properties = args[:row_properties] if args.key?(:row_properties)
|
2017-06-14 17:02:03 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Properties referring a single dimension (either row or column). If both
|
2020-08-18 00:38:22 +00:00
|
|
|
# BandedRange.row_properties and BandedRange.column_properties are set, the fill
|
|
|
|
# colors are applied to cells according to the following rules: * header_color
|
|
|
|
# and footer_color take priority over band colors. * first_band_color takes
|
|
|
|
# priority over second_band_color. * row_properties takes priority over
|
|
|
|
# column_properties. For example, the first row color takes priority over the
|
|
|
|
# first column color, but the first column color takes priority over the second
|
|
|
|
# row color. Similarly, the row header takes priority over the column header in
|
|
|
|
# the top left cell, but the column header takes priority over the first row
|
2017-08-25 19:54:22 +00:00
|
|
|
# color if the row header is not set.
|
|
|
|
class BandingProperties
|
|
|
|
include Google::Apis::Core::Hashable
|
2016-05-16 16:49:15 +00:00
|
|
|
|
2017-05-04 19:35:56 +00:00
|
|
|
# Represents a color in the RGBA color space. This representation is designed
|
|
|
|
# for simplicity of conversion to/from color representations in various
|
2020-08-18 00:38:22 +00:00
|
|
|
# languages over compactness; for example, the fields of this representation can
|
|
|
|
# be trivially provided to the constructor of "java.awt.Color" in Java; it can
|
|
|
|
# also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
|
|
|
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
|
|
|
# CSS "rgba()" string in JavaScript, as well. Note: this proto does not carry
|
|
|
|
# information about the absolute color space that should be used to interpret
|
|
|
|
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
|
|
|
# applications SHOULD assume the sRGB color space. Note: when color equality
|
|
|
|
# needs to be decided, implementations, unless documented otherwise, will treat
|
|
|
|
# two colors to be equal if all their red, green, blue and alpha values each
|
|
|
|
# differ by at most 1e-5. 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(''); `; // ...
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `firstBandColor`
|
2017-05-04 19:35:56 +00:00
|
|
|
# @return [Google::Apis::SheetsV4::Color]
|
2017-08-25 19:54:22 +00:00
|
|
|
attr_accessor :first_band_color
|
2017-07-12 20:10:42 +00:00
|
|
|
|
2020-02-05 00:37:38 +00:00
|
|
|
# A color value.
|
|
|
|
# Corresponds to the JSON property `firstBandColorStyle`
|
|
|
|
# @return [Google::Apis::SheetsV4::ColorStyle]
|
|
|
|
attr_accessor :first_band_color_style
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Represents a color in the RGBA color space. This representation is designed
|
|
|
|
# for simplicity of conversion to/from color representations in various
|
2020-08-18 00:38:22 +00:00
|
|
|
# languages over compactness; for example, the fields of this representation can
|
|
|
|
# be trivially provided to the constructor of "java.awt.Color" in Java; it can
|
|
|
|
# also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
|
|
|
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
|
|
|
# CSS "rgba()" string in JavaScript, as well. Note: this proto does not carry
|
|
|
|
# information about the absolute color space that should be used to interpret
|
|
|
|
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
|
|
|
# applications SHOULD assume the sRGB color space. Note: when color equality
|
|
|
|
# needs to be decided, implementations, unless documented otherwise, will treat
|
|
|
|
# two colors to be equal if all their red, green, blue and alpha values each
|
|
|
|
# differ by at most 1e-5. 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(''); `; // ...
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `footerColor`
|
|
|
|
# @return [Google::Apis::SheetsV4::Color]
|
|
|
|
attr_accessor :footer_color
|
2017-07-12 20:10:42 +00:00
|
|
|
|
2020-02-05 00:37:38 +00:00
|
|
|
# A color value.
|
|
|
|
# Corresponds to the JSON property `footerColorStyle`
|
|
|
|
# @return [Google::Apis::SheetsV4::ColorStyle]
|
|
|
|
attr_accessor :footer_color_style
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Represents a color in the RGBA color space. This representation is designed
|
|
|
|
# for simplicity of conversion to/from color representations in various
|
2020-08-18 00:38:22 +00:00
|
|
|
# languages over compactness; for example, the fields of this representation can
|
|
|
|
# be trivially provided to the constructor of "java.awt.Color" in Java; it can
|
|
|
|
# also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
|
|
|
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
|
|
|
# CSS "rgba()" string in JavaScript, as well. Note: this proto does not carry
|
|
|
|
# information about the absolute color space that should be used to interpret
|
|
|
|
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
|
|
|
# applications SHOULD assume the sRGB color space. Note: when color equality
|
|
|
|
# needs to be decided, implementations, unless documented otherwise, will treat
|
|
|
|
# two colors to be equal if all their red, green, blue and alpha values each
|
|
|
|
# differ by at most 1e-5. 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(''); `; // ...
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `headerColor`
|
|
|
|
# @return [Google::Apis::SheetsV4::Color]
|
|
|
|
attr_accessor :header_color
|
2017-07-12 20:10:42 +00:00
|
|
|
|
2020-02-05 00:37:38 +00:00
|
|
|
# A color value.
|
|
|
|
# Corresponds to the JSON property `headerColorStyle`
|
|
|
|
# @return [Google::Apis::SheetsV4::ColorStyle]
|
|
|
|
attr_accessor :header_color_style
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Represents a color in the RGBA color space. This representation is designed
|
|
|
|
# for simplicity of conversion to/from color representations in various
|
2020-08-18 00:38:22 +00:00
|
|
|
# languages over compactness; for example, the fields of this representation can
|
|
|
|
# be trivially provided to the constructor of "java.awt.Color" in Java; it can
|
|
|
|
# also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
|
|
|
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
|
|
|
# CSS "rgba()" string in JavaScript, as well. Note: this proto does not carry
|
|
|
|
# information about the absolute color space that should be used to interpret
|
|
|
|
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
|
|
|
# applications SHOULD assume the sRGB color space. Note: when color equality
|
|
|
|
# needs to be decided, implementations, unless documented otherwise, will treat
|
|
|
|
# two colors to be equal if all their red, green, blue and alpha values each
|
|
|
|
# differ by at most 1e-5. 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(''); `; // ...
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `secondBandColor`
|
|
|
|
# @return [Google::Apis::SheetsV4::Color]
|
|
|
|
attr_accessor :second_band_color
|
2017-05-26 16:44:32 +00:00
|
|
|
|
2020-02-05 00:37:38 +00:00
|
|
|
# A color value.
|
|
|
|
# Corresponds to the JSON property `secondBandColorStyle`
|
|
|
|
# @return [Google::Apis::SheetsV4::ColorStyle]
|
|
|
|
attr_accessor :second_band_color_style
|
|
|
|
|
2017-05-26 16:44:32 +00:00
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@first_band_color = args[:first_band_color] if args.key?(:first_band_color)
|
2020-02-05 00:37:38 +00:00
|
|
|
@first_band_color_style = args[:first_band_color_style] if args.key?(:first_band_color_style)
|
2017-08-25 19:54:22 +00:00
|
|
|
@footer_color = args[:footer_color] if args.key?(:footer_color)
|
2020-02-05 00:37:38 +00:00
|
|
|
@footer_color_style = args[:footer_color_style] if args.key?(:footer_color_style)
|
2017-08-25 19:54:22 +00:00
|
|
|
@header_color = args[:header_color] if args.key?(:header_color)
|
2020-02-05 00:37:38 +00:00
|
|
|
@header_color_style = args[:header_color_style] if args.key?(:header_color_style)
|
2017-08-25 19:54:22 +00:00
|
|
|
@second_band_color = args[:second_band_color] if args.key?(:second_band_color)
|
2020-02-05 00:37:38 +00:00
|
|
|
@second_band_color_style = args[:second_band_color_style] if args.key?(:second_band_color_style)
|
2017-05-26 16:44:32 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2019-10-09 00:37:55 +00:00
|
|
|
# Formatting options for baseline value.
|
|
|
|
class BaselineValueFormat
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
|
|
|
# The comparison type of key value with baseline value.
|
|
|
|
# Corresponds to the JSON property `comparisonType`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :comparison_type
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# Description which is appended after the baseline value. This field is optional.
|
2019-10-09 00:37:55 +00:00
|
|
|
# Corresponds to the JSON property `description`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :description
|
|
|
|
|
|
|
|
# Represents a color in the RGBA color space. This representation is designed
|
|
|
|
# for simplicity of conversion to/from color representations in various
|
2020-08-18 00:38:22 +00:00
|
|
|
# languages over compactness; for example, the fields of this representation can
|
|
|
|
# be trivially provided to the constructor of "java.awt.Color" in Java; it can
|
|
|
|
# also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
|
|
|
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
|
|
|
# CSS "rgba()" string in JavaScript, as well. Note: this proto does not carry
|
|
|
|
# information about the absolute color space that should be used to interpret
|
|
|
|
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
|
|
|
# applications SHOULD assume the sRGB color space. Note: when color equality
|
|
|
|
# needs to be decided, implementations, unless documented otherwise, will treat
|
|
|
|
# two colors to be equal if all their red, green, blue and alpha values each
|
|
|
|
# differ by at most 1e-5. 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(''); `; // ...
|
2019-10-09 00:37:55 +00:00
|
|
|
# Corresponds to the JSON property `negativeColor`
|
|
|
|
# @return [Google::Apis::SheetsV4::Color]
|
|
|
|
attr_accessor :negative_color
|
|
|
|
|
2020-01-25 00:37:19 +00:00
|
|
|
# A color value.
|
|
|
|
# Corresponds to the JSON property `negativeColorStyle`
|
|
|
|
# @return [Google::Apis::SheetsV4::ColorStyle]
|
|
|
|
attr_accessor :negative_color_style
|
|
|
|
|
2019-10-09 00:37:55 +00:00
|
|
|
# Position settings for text.
|
|
|
|
# Corresponds to the JSON property `position`
|
|
|
|
# @return [Google::Apis::SheetsV4::TextPosition]
|
|
|
|
attr_accessor :position
|
|
|
|
|
|
|
|
# Represents a color in the RGBA color space. This representation is designed
|
|
|
|
# for simplicity of conversion to/from color representations in various
|
2020-08-18 00:38:22 +00:00
|
|
|
# languages over compactness; for example, the fields of this representation can
|
|
|
|
# be trivially provided to the constructor of "java.awt.Color" in Java; it can
|
|
|
|
# also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
|
|
|
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
|
|
|
# CSS "rgba()" string in JavaScript, as well. Note: this proto does not carry
|
|
|
|
# information about the absolute color space that should be used to interpret
|
|
|
|
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
|
|
|
# applications SHOULD assume the sRGB color space. Note: when color equality
|
|
|
|
# needs to be decided, implementations, unless documented otherwise, will treat
|
|
|
|
# two colors to be equal if all their red, green, blue and alpha values each
|
|
|
|
# differ by at most 1e-5. 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(''); `; // ...
|
2019-10-09 00:37:55 +00:00
|
|
|
# Corresponds to the JSON property `positiveColor`
|
|
|
|
# @return [Google::Apis::SheetsV4::Color]
|
|
|
|
attr_accessor :positive_color
|
|
|
|
|
2020-01-25 00:37:19 +00:00
|
|
|
# A color value.
|
|
|
|
# Corresponds to the JSON property `positiveColorStyle`
|
|
|
|
# @return [Google::Apis::SheetsV4::ColorStyle]
|
|
|
|
attr_accessor :positive_color_style
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The format of a run of text in a cell. Absent values indicate that the field
|
|
|
|
# isn't specified.
|
2019-10-09 00:37:55 +00:00
|
|
|
# Corresponds to the JSON property `textFormat`
|
|
|
|
# @return [Google::Apis::SheetsV4::TextFormat]
|
|
|
|
attr_accessor :text_format
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@comparison_type = args[:comparison_type] if args.key?(:comparison_type)
|
|
|
|
@description = args[:description] if args.key?(:description)
|
|
|
|
@negative_color = args[:negative_color] if args.key?(:negative_color)
|
2020-01-25 00:37:19 +00:00
|
|
|
@negative_color_style = args[:negative_color_style] if args.key?(:negative_color_style)
|
2019-10-09 00:37:55 +00:00
|
|
|
@position = args[:position] if args.key?(:position)
|
|
|
|
@positive_color = args[:positive_color] if args.key?(:positive_color)
|
2020-01-25 00:37:19 +00:00
|
|
|
@positive_color_style = args[:positive_color_style] if args.key?(:positive_color_style)
|
2019-10-09 00:37:55 +00:00
|
|
|
@text_format = args[:text_format] if args.key?(:text_format)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# An axis of the chart. A chart may not have more than one axis per axis
|
|
|
|
# position.
|
2017-08-25 19:54:22 +00:00
|
|
|
class BasicChartAxis
|
2017-05-26 16:44:32 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The format of a run of text in a cell. Absent values indicate that the field
|
|
|
|
# isn't specified.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `format`
|
|
|
|
# @return [Google::Apis::SheetsV4::TextFormat]
|
|
|
|
attr_accessor :format
|
|
|
|
|
|
|
|
# The position of this axis.
|
|
|
|
# Corresponds to the JSON property `position`
|
2017-07-12 20:10:42 +00:00
|
|
|
# @return [String]
|
2017-08-25 19:54:22 +00:00
|
|
|
attr_accessor :position
|
2017-06-14 17:02:03 +00:00
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The title of this axis. If set, this overrides any title inferred from headers
|
|
|
|
# of the data.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `title`
|
2017-07-12 20:10:42 +00:00
|
|
|
# @return [String]
|
2017-08-25 19:54:22 +00:00
|
|
|
attr_accessor :title
|
2017-05-26 16:44:32 +00:00
|
|
|
|
2017-10-03 00:35:28 +00:00
|
|
|
# Position settings for text.
|
|
|
|
# Corresponds to the JSON property `titleTextPosition`
|
|
|
|
# @return [Google::Apis::SheetsV4::TextPosition]
|
|
|
|
attr_accessor :title_text_position
|
|
|
|
|
2019-08-06 00:38:19 +00:00
|
|
|
# The options that define a "view window" for a chart (such as the visible
|
|
|
|
# values in an axis).
|
|
|
|
# Corresponds to the JSON property `viewWindowOptions`
|
|
|
|
# @return [Google::Apis::SheetsV4::ChartAxisViewWindowOptions]
|
|
|
|
attr_accessor :view_window_options
|
|
|
|
|
2017-05-26 16:44:32 +00:00
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@format = args[:format] if args.key?(:format)
|
|
|
|
@position = args[:position] if args.key?(:position)
|
|
|
|
@title = args[:title] if args.key?(:title)
|
2017-10-03 00:35:28 +00:00
|
|
|
@title_text_position = args[:title_text_position] if args.key?(:title_text_position)
|
2019-08-06 00:38:19 +00:00
|
|
|
@view_window_options = args[:view_window_options] if args.key?(:view_window_options)
|
2017-05-26 16:44:32 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The domain of a chart. For example, if charting stock prices over time, this
|
|
|
|
# would be the date.
|
2017-08-25 19:54:22 +00:00
|
|
|
class BasicChartDomain
|
2017-05-26 16:44:32 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The data included in a domain or series.
|
|
|
|
# Corresponds to the JSON property `domain`
|
|
|
|
# @return [Google::Apis::SheetsV4::ChartData]
|
|
|
|
attr_accessor :domain
|
2017-06-14 17:02:03 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# True to reverse the order of the domain values (horizontal axis).
|
|
|
|
# Corresponds to the JSON property `reversed`
|
|
|
|
# @return [Boolean]
|
|
|
|
attr_accessor :reversed
|
|
|
|
alias_method :reversed?, :reversed
|
2017-06-14 17:02:03 +00:00
|
|
|
|
2017-07-12 20:10:42 +00:00
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
2017-06-14 17:02:03 +00:00
|
|
|
|
2017-07-12 20:10:42 +00:00
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@domain = args[:domain] if args.key?(:domain)
|
|
|
|
@reversed = args[:reversed] if args.key?(:reversed)
|
2017-07-12 20:10:42 +00:00
|
|
|
end
|
|
|
|
end
|
2017-06-14 17:02:03 +00:00
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# A single series of data in a chart. For example, if charting stock prices over
|
|
|
|
# time, multiple series may exist, one for the "Open Price", "High Price", "Low
|
|
|
|
# Price" and "Close Price".
|
2017-08-25 19:54:22 +00:00
|
|
|
class BasicChartSeries
|
2017-07-12 20:10:42 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
2017-06-14 17:02:03 +00:00
|
|
|
|
2018-04-10 00:35:44 +00:00
|
|
|
# Represents a color in the RGBA color space. This representation is designed
|
|
|
|
# for simplicity of conversion to/from color representations in various
|
2020-08-18 00:38:22 +00:00
|
|
|
# languages over compactness; for example, the fields of this representation can
|
|
|
|
# be trivially provided to the constructor of "java.awt.Color" in Java; it can
|
|
|
|
# also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
|
|
|
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
|
|
|
# CSS "rgba()" string in JavaScript, as well. Note: this proto does not carry
|
|
|
|
# information about the absolute color space that should be used to interpret
|
|
|
|
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
|
|
|
# applications SHOULD assume the sRGB color space. Note: when color equality
|
|
|
|
# needs to be decided, implementations, unless documented otherwise, will treat
|
|
|
|
# two colors to be equal if all their red, green, blue and alpha values each
|
|
|
|
# differ by at most 1e-5. 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(''); `; // ...
|
2018-04-10 00:35:44 +00:00
|
|
|
# Corresponds to the JSON property `color`
|
|
|
|
# @return [Google::Apis::SheetsV4::Color]
|
|
|
|
attr_accessor :color
|
|
|
|
|
2020-01-25 00:37:19 +00:00
|
|
|
# A color value.
|
|
|
|
# Corresponds to the JSON property `colorStyle`
|
|
|
|
# @return [Google::Apis::SheetsV4::ColorStyle]
|
|
|
|
attr_accessor :color_style
|
|
|
|
|
2017-12-19 00:35:20 +00:00
|
|
|
# Properties that describe the style of a line.
|
|
|
|
# Corresponds to the JSON property `lineStyle`
|
|
|
|
# @return [Google::Apis::SheetsV4::LineStyle]
|
|
|
|
attr_accessor :line_style
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The data included in a domain or series.
|
|
|
|
# Corresponds to the JSON property `series`
|
|
|
|
# @return [Google::Apis::SheetsV4::ChartData]
|
|
|
|
attr_accessor :series
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The minor axis that will specify the range of values for this series. For
|
|
|
|
# example, if charting stocks over time, the "Volume" series may want to be
|
|
|
|
# pinned to the right with the prices pinned to the left, because the scale of
|
|
|
|
# trading volume is different than the scale of prices. It is an error to
|
|
|
|
# specify an axis that isn't a valid minor axis for the chart's type.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `targetAxis`
|
2017-06-14 17:02:03 +00:00
|
|
|
# @return [String]
|
2017-08-25 19:54:22 +00:00
|
|
|
attr_accessor :target_axis
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The type of this series. Valid only if the chartType is COMBO. Different types
|
|
|
|
# will change the way the series is visualized. Only LINE, AREA, and COLUMN are
|
|
|
|
# supported.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `type`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :type
|
2017-05-26 16:44:32 +00:00
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2018-04-10 00:35:44 +00:00
|
|
|
@color = args[:color] if args.key?(:color)
|
2020-01-25 00:37:19 +00:00
|
|
|
@color_style = args[:color_style] if args.key?(:color_style)
|
2017-12-19 00:35:20 +00:00
|
|
|
@line_style = args[:line_style] if args.key?(:line_style)
|
2017-08-25 19:54:22 +00:00
|
|
|
@series = args[:series] if args.key?(:series)
|
|
|
|
@target_axis = args[:target_axis] if args.key?(:target_axis)
|
|
|
|
@type = args[:type] if args.key?(:type)
|
2017-05-26 16:44:32 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The specification for a basic chart. See BasicChartType for the list of charts
|
|
|
|
# this supports.
|
2017-08-25 19:54:22 +00:00
|
|
|
class BasicChartSpec
|
2017-05-26 16:44:32 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The axis on the chart.
|
|
|
|
# Corresponds to the JSON property `axis`
|
|
|
|
# @return [Array<Google::Apis::SheetsV4::BasicChartAxis>]
|
|
|
|
attr_accessor :axis
|
2017-05-26 16:44:32 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The type of the chart.
|
|
|
|
# Corresponds to the JSON property `chartType`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :chart_type
|
2017-05-26 16:44:32 +00:00
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The behavior of tooltips and data highlighting when hovering on data and chart
|
|
|
|
# area.
|
2017-10-03 00:35:28 +00:00
|
|
|
# Corresponds to the JSON property `compareMode`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :compare_mode
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The domain of data this is charting. Only a single domain is supported.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `domains`
|
|
|
|
# @return [Array<Google::Apis::SheetsV4::BasicChartDomain>]
|
|
|
|
attr_accessor :domains
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The number of rows or columns in the data that are "headers". If not set,
|
|
|
|
# Google Sheets will guess how many rows are headers based on the data. (Note
|
|
|
|
# that BasicChartAxis.title may override the axis title inferred from the header
|
|
|
|
# values.)
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `headerCount`
|
|
|
|
# @return [Fixnum]
|
|
|
|
attr_accessor :header_count
|
|
|
|
|
|
|
|
# If some values in a series are missing, gaps may appear in the chart (e.g,
|
2020-08-18 00:38:22 +00:00
|
|
|
# segments of lines in a line chart will be missing). To eliminate these gaps
|
|
|
|
# set this to true. Applies to Line, Area, and Combo charts.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `interpolateNulls`
|
|
|
|
# @return [Boolean]
|
|
|
|
attr_accessor :interpolate_nulls
|
|
|
|
alias_method :interpolate_nulls?, :interpolate_nulls
|
|
|
|
|
|
|
|
# The position of the chart legend.
|
|
|
|
# Corresponds to the JSON property `legendPosition`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :legend_position
|
|
|
|
|
|
|
|
# Gets whether all lines should be rendered smooth or straight by default.
|
|
|
|
# Applies to Line charts.
|
|
|
|
# Corresponds to the JSON property `lineSmoothing`
|
|
|
|
# @return [Boolean]
|
|
|
|
attr_accessor :line_smoothing
|
|
|
|
alias_method :line_smoothing?, :line_smoothing
|
|
|
|
|
|
|
|
# The data this chart is visualizing.
|
|
|
|
# Corresponds to the JSON property `series`
|
|
|
|
# @return [Array<Google::Apis::SheetsV4::BasicChartSeries>]
|
|
|
|
attr_accessor :series
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The stacked type for charts that support vertical stacking. Applies to Area,
|
|
|
|
# Bar, Column, Combo, and Stepped Area charts.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `stackedType`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :stacked_type
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# True to make the chart 3D. Applies to Bar and Column charts.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `threeDimensional`
|
|
|
|
# @return [Boolean]
|
|
|
|
attr_accessor :three_dimensional
|
|
|
|
alias_method :three_dimensional?, :three_dimensional
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@axis = args[:axis] if args.key?(:axis)
|
|
|
|
@chart_type = args[:chart_type] if args.key?(:chart_type)
|
2017-10-03 00:35:28 +00:00
|
|
|
@compare_mode = args[:compare_mode] if args.key?(:compare_mode)
|
2017-08-25 19:54:22 +00:00
|
|
|
@domains = args[:domains] if args.key?(:domains)
|
|
|
|
@header_count = args[:header_count] if args.key?(:header_count)
|
|
|
|
@interpolate_nulls = args[:interpolate_nulls] if args.key?(:interpolate_nulls)
|
|
|
|
@legend_position = args[:legend_position] if args.key?(:legend_position)
|
|
|
|
@line_smoothing = args[:line_smoothing] if args.key?(:line_smoothing)
|
|
|
|
@series = args[:series] if args.key?(:series)
|
|
|
|
@stacked_type = args[:stacked_type] if args.key?(:stacked_type)
|
|
|
|
@three_dimensional = args[:three_dimensional] if args.key?(:three_dimensional)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
# The default filter associated with a sheet.
|
|
|
|
class BasicFilter
|
2017-05-26 16:44:32 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The criteria for showing/hiding values per column. The map's key is the column
|
2020-09-29 00:38:39 +00:00
|
|
|
# index, and the value is the criteria for that column. This field is deprecated
|
|
|
|
# in favor of filter_specs.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `criteria`
|
|
|
|
# @return [Hash<String,Google::Apis::SheetsV4::FilterCriteria>]
|
|
|
|
attr_accessor :criteria
|
|
|
|
|
2020-08-28 00:38:58 +00:00
|
|
|
# The filter criteria per column. Both criteria and filter_specs are populated
|
|
|
|
# in responses. If both fields are specified in an update request, this field
|
|
|
|
# takes precedence.
|
|
|
|
# Corresponds to the JSON property `filterSpecs`
|
|
|
|
# @return [Array<Google::Apis::SheetsV4::FilterSpec>]
|
|
|
|
attr_accessor :filter_specs
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# A range on a sheet. All indexes are zero-based. Indexes are half open, i.e.
|
|
|
|
# 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 sheet 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!`.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `range`
|
|
|
|
# @return [Google::Apis::SheetsV4::GridRange]
|
|
|
|
attr_accessor :range
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The sort order per column. Later specifications are used when values are equal
|
|
|
|
# in the earlier specifications.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `sortSpecs`
|
|
|
|
# @return [Array<Google::Apis::SheetsV4::SortSpec>]
|
|
|
|
attr_accessor :sort_specs
|
2017-05-26 16:44:32 +00:00
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@criteria = args[:criteria] if args.key?(:criteria)
|
2020-08-28 00:38:58 +00:00
|
|
|
@filter_specs = args[:filter_specs] if args.key?(:filter_specs)
|
2017-08-25 19:54:22 +00:00
|
|
|
@range = args[:range] if args.key?(:range)
|
|
|
|
@sort_specs = args[:sort_specs] if args.key?(:sort_specs)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The request for clearing more than one range selected by a DataFilter in a
|
|
|
|
# spreadsheet.
|
2017-09-20 00:35:54 +00:00
|
|
|
class BatchClearValuesByDataFilterRequest
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
|
|
|
# The DataFilters used to determine which ranges to clear.
|
|
|
|
# Corresponds to the JSON property `dataFilters`
|
|
|
|
# @return [Array<Google::Apis::SheetsV4::DataFilter>]
|
|
|
|
attr_accessor :data_filters
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@data_filters = args[:data_filters] if args.key?(:data_filters)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The response when clearing a range of values selected with DataFilters in a
|
|
|
|
# spreadsheet.
|
2017-09-20 00:35:54 +00:00
|
|
|
class BatchClearValuesByDataFilterResponse
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2020-01-25 00:37:19 +00:00
|
|
|
# The ranges that were cleared, in A1 notation. If the requests are for an
|
2020-08-18 00:38:22 +00:00
|
|
|
# unbounded range or a ranger larger than the bounds of the sheet, this is the
|
|
|
|
# actual ranges that were cleared, bounded to the sheet's limits.
|
2017-09-20 00:35:54 +00:00
|
|
|
# Corresponds to the JSON property `clearedRanges`
|
|
|
|
# @return [Array<String>]
|
|
|
|
attr_accessor :cleared_ranges
|
|
|
|
|
|
|
|
# The spreadsheet the updates were applied to.
|
|
|
|
# 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)
|
|
|
|
@cleared_ranges = args[:cleared_ranges] if args.key?(:cleared_ranges)
|
|
|
|
@spreadsheet_id = args[:spreadsheet_id] if args.key?(:spreadsheet_id)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The request for clearing more than one range of values in a spreadsheet.
|
|
|
|
class BatchClearValuesRequest
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
|
|
|
# The ranges to clear, in A1 notation.
|
|
|
|
# Corresponds to the JSON property `ranges`
|
|
|
|
# @return [Array<String>]
|
|
|
|
attr_accessor :ranges
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@ranges = args[:ranges] if args.key?(:ranges)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
# The response when clearing a range of values in a spreadsheet.
|
|
|
|
class BatchClearValuesResponse
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2020-01-25 00:37:19 +00:00
|
|
|
# The ranges that were cleared, in A1 notation. If the requests are for an
|
2020-08-18 00:38:22 +00:00
|
|
|
# unbounded range or a ranger larger than the bounds of the sheet, this is the
|
|
|
|
# actual ranges that were cleared, bounded to the sheet's limits.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `clearedRanges`
|
|
|
|
# @return [Array<String>]
|
|
|
|
attr_accessor :cleared_ranges
|
|
|
|
|
|
|
|
# The spreadsheet the updates were applied to.
|
|
|
|
# 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)
|
|
|
|
@cleared_ranges = args[:cleared_ranges] if args.key?(:cleared_ranges)
|
|
|
|
@spreadsheet_id = args[:spreadsheet_id] if args.key?(:spreadsheet_id)
|
2017-05-26 16:44:32 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-09-20 00:35:54 +00:00
|
|
|
# The request for retrieving a range of values in a spreadsheet selected by a
|
|
|
|
# set of DataFilters.
|
|
|
|
class BatchGetValuesByDataFilterRequest
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The data filters used to match the ranges of values to retrieve. Ranges that
|
|
|
|
# match any of the specified data filters are included in the response.
|
2017-09-20 00:35:54 +00:00
|
|
|
# Corresponds to the JSON property `dataFilters`
|
|
|
|
# @return [Array<Google::Apis::SheetsV4::DataFilter>]
|
|
|
|
attr_accessor :data_filters
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# How dates, times, and durations should be represented in the output. This is
|
|
|
|
# ignored if value_render_option is FORMATTED_VALUE. The default dateTime render
|
|
|
|
# option is [DateTimeRenderOption.SERIAL_NUMBER].
|
2017-09-20 00:35:54 +00:00
|
|
|
# Corresponds to the JSON property `dateTimeRenderOption`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :date_time_render_option
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The major dimension that results should use. For example, if the spreadsheet
|
|
|
|
# data is: `A1=1,B1=2,A2=3,B2=4`, then a request that selects that range and
|
|
|
|
# sets `majorDimension=ROWS` returns `[[1,2],[3,4]]`, whereas a request that
|
|
|
|
# sets `majorDimension=COLUMNS` returns `[[1,3],[2,4]]`.
|
2017-09-20 00:35:54 +00:00
|
|
|
# Corresponds to the JSON property `majorDimension`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :major_dimension
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# How values should be represented in the output. The default render option is
|
|
|
|
# ValueRenderOption.FORMATTED_VALUE.
|
2017-09-20 00:35:54 +00:00
|
|
|
# Corresponds to the JSON property `valueRenderOption`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :value_render_option
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@data_filters = args[:data_filters] if args.key?(:data_filters)
|
|
|
|
@date_time_render_option = args[:date_time_render_option] if args.key?(:date_time_render_option)
|
|
|
|
@major_dimension = args[:major_dimension] if args.key?(:major_dimension)
|
|
|
|
@value_render_option = args[:value_render_option] if args.key?(:value_render_option)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
# The response when retrieving more than one range of values in a spreadsheet
|
|
|
|
# selected by DataFilters.
|
|
|
|
class BatchGetValuesByDataFilterResponse
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
|
|
|
# The ID of the spreadsheet the data was retrieved from.
|
|
|
|
# Corresponds to the JSON property `spreadsheetId`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :spreadsheet_id
|
|
|
|
|
|
|
|
# The requested values with the list of data filters that matched them.
|
|
|
|
# Corresponds to the JSON property `valueRanges`
|
|
|
|
# @return [Array<Google::Apis::SheetsV4::MatchedValueRange>]
|
|
|
|
attr_accessor :value_ranges
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@spreadsheet_id = args[:spreadsheet_id] if args.key?(:spreadsheet_id)
|
|
|
|
@value_ranges = args[:value_ranges] if args.key?(:value_ranges)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-07-12 20:10:42 +00:00
|
|
|
# The response when retrieving more than one range of values in a spreadsheet.
|
|
|
|
class BatchGetValuesResponse
|
2017-05-26 16:44:32 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2017-07-12 20:10:42 +00:00
|
|
|
# The ID of the spreadsheet the data was retrieved from.
|
|
|
|
# Corresponds to the JSON property `spreadsheetId`
|
2017-05-26 16:44:32 +00:00
|
|
|
# @return [String]
|
2017-07-12 20:10:42 +00:00
|
|
|
attr_accessor :spreadsheet_id
|
2017-04-03 20:18:48 +00:00
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The requested values. The order of the ValueRanges is the same as the order of
|
|
|
|
# the requested ranges.
|
2017-07-12 20:10:42 +00:00
|
|
|
# Corresponds to the JSON property `valueRanges`
|
|
|
|
# @return [Array<Google::Apis::SheetsV4::ValueRange>]
|
|
|
|
attr_accessor :value_ranges
|
2017-06-02 06:11:31 +00:00
|
|
|
|
2017-05-26 16:44:32 +00:00
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
2017-04-03 20:18:48 +00:00
|
|
|
|
2017-05-26 16:44:32 +00:00
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-07-12 20:10:42 +00:00
|
|
|
@spreadsheet_id = args[:spreadsheet_id] if args.key?(:spreadsheet_id)
|
|
|
|
@value_ranges = args[:value_ranges] if args.key?(:value_ranges)
|
2017-05-26 16:44:32 +00:00
|
|
|
end
|
|
|
|
end
|
2017-04-03 20:18:48 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The request for updating any aspect of a spreadsheet.
|
|
|
|
class BatchUpdateSpreadsheetRequest
|
2017-05-26 16:44:32 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
2017-04-03 20:18:48 +00:00
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# Determines if the update response should include the spreadsheet resource.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `includeSpreadsheetInResponse`
|
|
|
|
# @return [Boolean]
|
|
|
|
attr_accessor :include_spreadsheet_in_response
|
|
|
|
alias_method :include_spreadsheet_in_response?, :include_spreadsheet_in_response
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# A list of updates to apply to the spreadsheet. Requests will be applied in the
|
|
|
|
# order they are specified. If any request is not valid, no requests will be
|
|
|
|
# applied.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `requests`
|
|
|
|
# @return [Array<Google::Apis::SheetsV4::Request>]
|
|
|
|
attr_accessor :requests
|
|
|
|
|
|
|
|
# True if grid data should be returned. Meaningful only if
|
2020-08-18 00:38:22 +00:00
|
|
|
# include_spreadsheet_in_response is 'true'. This parameter is ignored if a
|
|
|
|
# field mask was set in the request.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `responseIncludeGridData`
|
|
|
|
# @return [Boolean]
|
|
|
|
attr_accessor :response_include_grid_data
|
|
|
|
alias_method :response_include_grid_data?, :response_include_grid_data
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# Limits the ranges included in the response spreadsheet. Meaningful only if
|
|
|
|
# include_spreadsheet_in_response is 'true'.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `responseRanges`
|
|
|
|
# @return [Array<String>]
|
|
|
|
attr_accessor :response_ranges
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@include_spreadsheet_in_response = args[:include_spreadsheet_in_response] if args.key?(:include_spreadsheet_in_response)
|
|
|
|
@requests = args[:requests] if args.key?(:requests)
|
|
|
|
@response_include_grid_data = args[:response_include_grid_data] if args.key?(:response_include_grid_data)
|
|
|
|
@response_ranges = args[:response_ranges] if args.key?(:response_ranges)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
# The reply for batch updating a spreadsheet.
|
|
|
|
class BatchUpdateSpreadsheetResponse
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The reply of the updates. This maps 1:1 with the updates, although replies to
|
|
|
|
# some requests may be empty.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `replies`
|
|
|
|
# @return [Array<Google::Apis::SheetsV4::Response>]
|
|
|
|
attr_accessor :replies
|
|
|
|
|
|
|
|
# The spreadsheet the updates were applied to.
|
|
|
|
# Corresponds to the JSON property `spreadsheetId`
|
2017-07-12 20:10:42 +00:00
|
|
|
# @return [String]
|
2017-08-25 19:54:22 +00:00
|
|
|
attr_accessor :spreadsheet_id
|
2017-07-12 20:10:42 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Resource that represents a spreadsheet.
|
|
|
|
# Corresponds to the JSON property `updatedSpreadsheet`
|
|
|
|
# @return [Google::Apis::SheetsV4::Spreadsheet]
|
|
|
|
attr_accessor :updated_spreadsheet
|
2017-03-10 21:11:09 +00:00
|
|
|
|
2017-03-30 22:30:51 +00:00
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
2016-05-16 16:49:15 +00:00
|
|
|
|
2017-03-30 22:30:51 +00:00
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@replies = args[:replies] if args.key?(:replies)
|
|
|
|
@spreadsheet_id = args[:spreadsheet_id] if args.key?(:spreadsheet_id)
|
|
|
|
@updated_spreadsheet = args[:updated_spreadsheet] if args.key?(:updated_spreadsheet)
|
2017-03-30 22:30:51 +00:00
|
|
|
end
|
|
|
|
end
|
2016-05-16 16:49:15 +00:00
|
|
|
|
2017-09-20 00:35:54 +00:00
|
|
|
# The request for updating more than one range of values in a spreadsheet.
|
|
|
|
class BatchUpdateValuesByDataFilterRequest
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The new values to apply to the spreadsheet. If more than one range is matched
|
|
|
|
# by the specified DataFilter the specified values are applied to all of those
|
|
|
|
# ranges.
|
2017-09-20 00:35:54 +00:00
|
|
|
# Corresponds to the JSON property `data`
|
|
|
|
# @return [Array<Google::Apis::SheetsV4::DataFilterValueRange>]
|
|
|
|
attr_accessor :data
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# Determines if the update response should include the values of the cells that
|
|
|
|
# were updated. By default, responses do not include the updated values. The `
|
|
|
|
# updatedData` field within each of the BatchUpdateValuesResponse.responses
|
|
|
|
# contains the updated values. If the range to write was larger than the range
|
|
|
|
# actually written, the response includes all values in the requested range (
|
|
|
|
# excluding trailing empty rows and columns).
|
2017-09-20 00:35:54 +00:00
|
|
|
# Corresponds to the JSON property `includeValuesInResponse`
|
|
|
|
# @return [Boolean]
|
|
|
|
attr_accessor :include_values_in_response
|
|
|
|
alias_method :include_values_in_response?, :include_values_in_response
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# Determines how dates, times, and durations in the response should be rendered.
|
|
|
|
# This is ignored if response_value_render_option is FORMATTED_VALUE. The
|
|
|
|
# default dateTime render option is DateTimeRenderOption.SERIAL_NUMBER.
|
2017-09-20 00:35:54 +00:00
|
|
|
# Corresponds to the JSON property `responseDateTimeRenderOption`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :response_date_time_render_option
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# Determines how values in the response should be rendered. The default render
|
|
|
|
# option is ValueRenderOption.FORMATTED_VALUE.
|
2017-09-20 00:35:54 +00:00
|
|
|
# Corresponds to the JSON property `responseValueRenderOption`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :response_value_render_option
|
|
|
|
|
|
|
|
# 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)
|
|
|
|
@include_values_in_response = args[:include_values_in_response] if args.key?(:include_values_in_response)
|
|
|
|
@response_date_time_render_option = args[:response_date_time_render_option] if args.key?(:response_date_time_render_option)
|
|
|
|
@response_value_render_option = args[:response_value_render_option] if args.key?(:response_value_render_option)
|
|
|
|
@value_input_option = args[:value_input_option] if args.key?(:value_input_option)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
# The response when updating a range of values in a spreadsheet.
|
|
|
|
class BatchUpdateValuesByDataFilterResponse
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
|
|
|
# The response for each range updated.
|
|
|
|
# Corresponds to the JSON property `responses`
|
|
|
|
# @return [Array<Google::Apis::SheetsV4::UpdateValuesByDataFilterResponse>]
|
|
|
|
attr_accessor :responses
|
|
|
|
|
|
|
|
# The spreadsheet the updates were applied to.
|
|
|
|
# Corresponds to the JSON property `spreadsheetId`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :spreadsheet_id
|
|
|
|
|
|
|
|
# The total number of cells updated.
|
|
|
|
# Corresponds to the JSON property `totalUpdatedCells`
|
|
|
|
# @return [Fixnum]
|
|
|
|
attr_accessor :total_updated_cells
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The total number of columns where at least one cell in the column was updated.
|
2017-09-20 00:35:54 +00:00
|
|
|
# Corresponds to the JSON property `totalUpdatedColumns`
|
|
|
|
# @return [Fixnum]
|
|
|
|
attr_accessor :total_updated_columns
|
|
|
|
|
|
|
|
# The total number of rows where at least one cell in the row was updated.
|
|
|
|
# Corresponds to the JSON property `totalUpdatedRows`
|
|
|
|
# @return [Fixnum]
|
|
|
|
attr_accessor :total_updated_rows
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The total number of sheets where at least one cell in the sheet was updated.
|
2017-09-20 00:35:54 +00:00
|
|
|
# Corresponds to the JSON property `totalUpdatedSheets`
|
|
|
|
# @return [Fixnum]
|
|
|
|
attr_accessor :total_updated_sheets
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@responses = args[:responses] if args.key?(:responses)
|
|
|
|
@spreadsheet_id = args[:spreadsheet_id] if args.key?(:spreadsheet_id)
|
|
|
|
@total_updated_cells = args[:total_updated_cells] if args.key?(:total_updated_cells)
|
|
|
|
@total_updated_columns = args[:total_updated_columns] if args.key?(:total_updated_columns)
|
|
|
|
@total_updated_rows = args[:total_updated_rows] if args.key?(:total_updated_rows)
|
|
|
|
@total_updated_sheets = args[:total_updated_sheets] if args.key?(:total_updated_sheets)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The request for updating more than one range of values in a spreadsheet.
|
|
|
|
class BatchUpdateValuesRequest
|
2017-03-30 22:30:51 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
2016-05-16 16:49:15 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The new values to apply to the spreadsheet.
|
|
|
|
# Corresponds to the JSON property `data`
|
|
|
|
# @return [Array<Google::Apis::SheetsV4::ValueRange>]
|
|
|
|
attr_accessor :data
|
2017-02-03 19:29:28 +00:00
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# Determines if the update response should include the values of the cells that
|
|
|
|
# were updated. By default, responses do not include the updated values. The `
|
|
|
|
# updatedData` field within each of the BatchUpdateValuesResponse.responses
|
|
|
|
# contains the updated values. If the range to write was larger than the range
|
|
|
|
# actually written, the response includes all values in the requested range (
|
|
|
|
# excluding trailing empty rows and columns).
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `includeValuesInResponse`
|
|
|
|
# @return [Boolean]
|
|
|
|
attr_accessor :include_values_in_response
|
|
|
|
alias_method :include_values_in_response?, :include_values_in_response
|
2016-10-20 20:15:24 +00:00
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# Determines how dates, times, and durations in the response should be rendered.
|
|
|
|
# This is ignored if response_value_render_option is FORMATTED_VALUE. The
|
|
|
|
# default dateTime render option is DateTimeRenderOption.SERIAL_NUMBER.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `responseDateTimeRenderOption`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :response_date_time_render_option
|
2016-10-20 20:15:24 +00:00
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# Determines how values in the response should be rendered. The default render
|
|
|
|
# option is ValueRenderOption.FORMATTED_VALUE.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `responseValueRenderOption`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :response_value_render_option
|
|
|
|
|
|
|
|
# How the input data should be interpreted.
|
|
|
|
# Corresponds to the JSON property `valueInputOption`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :value_input_option
|
2017-03-31 19:53:27 +00:00
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
2017-03-30 22:30:51 +00:00
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@data = args[:data] if args.key?(:data)
|
|
|
|
@include_values_in_response = args[:include_values_in_response] if args.key?(:include_values_in_response)
|
|
|
|
@response_date_time_render_option = args[:response_date_time_render_option] if args.key?(:response_date_time_render_option)
|
|
|
|
@response_value_render_option = args[:response_value_render_option] if args.key?(:response_value_render_option)
|
|
|
|
@value_input_option = args[:value_input_option] if args.key?(:value_input_option)
|
2017-03-30 22:30:51 +00:00
|
|
|
end
|
|
|
|
end
|
2017-02-13 23:28:52 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The response when updating a range of values in a spreadsheet.
|
|
|
|
class BatchUpdateValuesResponse
|
2017-03-30 22:30:51 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
2017-02-13 23:28:52 +00:00
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# One UpdateValuesResponse per requested range, in the same order as the
|
|
|
|
# requests appeared.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `responses`
|
|
|
|
# @return [Array<Google::Apis::SheetsV4::UpdateValuesResponse>]
|
|
|
|
attr_accessor :responses
|
2017-06-14 17:02:03 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The spreadsheet the updates were applied to.
|
|
|
|
# Corresponds to the JSON property `spreadsheetId`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :spreadsheet_id
|
2017-06-14 17:02:03 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The total number of cells updated.
|
|
|
|
# Corresponds to the JSON property `totalUpdatedCells`
|
|
|
|
# @return [Fixnum]
|
|
|
|
attr_accessor :total_updated_cells
|
2017-06-14 17:02:03 +00:00
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The total number of columns where at least one cell in the column was updated.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `totalUpdatedColumns`
|
2017-06-14 17:02:03 +00:00
|
|
|
# @return [Fixnum]
|
2017-08-25 19:54:22 +00:00
|
|
|
attr_accessor :total_updated_columns
|
2017-06-14 17:02:03 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The total number of rows where at least one cell in the row was updated.
|
|
|
|
# Corresponds to the JSON property `totalUpdatedRows`
|
|
|
|
# @return [Fixnum]
|
|
|
|
attr_accessor :total_updated_rows
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The total number of sheets where at least one cell in the sheet was updated.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `totalUpdatedSheets`
|
|
|
|
# @return [Fixnum]
|
|
|
|
attr_accessor :total_updated_sheets
|
2017-01-25 07:37:13 +00:00
|
|
|
|
2017-05-26 16:44:32 +00:00
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
2016-11-08 23:43:14 +00:00
|
|
|
|
2017-05-26 16:44:32 +00:00
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@responses = args[:responses] if args.key?(:responses)
|
|
|
|
@spreadsheet_id = args[:spreadsheet_id] if args.key?(:spreadsheet_id)
|
|
|
|
@total_updated_cells = args[:total_updated_cells] if args.key?(:total_updated_cells)
|
|
|
|
@total_updated_columns = args[:total_updated_columns] if args.key?(:total_updated_columns)
|
|
|
|
@total_updated_rows = args[:total_updated_rows] if args.key?(:total_updated_rows)
|
|
|
|
@total_updated_sheets = args[:total_updated_sheets] if args.key?(:total_updated_sheets)
|
2017-05-26 16:44:32 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2020-09-29 00:38:39 +00:00
|
|
|
# The specification of a BigQuery data source that's connected to a sheet.
|
2020-08-28 00:38:58 +00:00
|
|
|
class BigQueryDataSourceSpec
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
|
|
|
# The ID of a BigQuery enabled GCP project with a billing account attached. For
|
|
|
|
# any queries executed against the data source, the project is charged.
|
|
|
|
# Corresponds to the JSON property `projectId`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :project_id
|
|
|
|
|
|
|
|
# Specifies a custom BigQuery query.
|
|
|
|
# Corresponds to the JSON property `querySpec`
|
|
|
|
# @return [Google::Apis::SheetsV4::BigQueryQuerySpec]
|
|
|
|
attr_accessor :query_spec
|
|
|
|
|
2020-09-29 00:38:39 +00:00
|
|
|
# Specifies a BigQuery table definition. Only [native tables](https://cloud.
|
|
|
|
# google.com/bigquery/docs/tables-intro) is allowed.
|
2020-08-28 00:38:58 +00:00
|
|
|
# Corresponds to the JSON property `tableSpec`
|
|
|
|
# @return [Google::Apis::SheetsV4::BigQueryTableSpec]
|
|
|
|
attr_accessor :table_spec
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@project_id = args[:project_id] if args.key?(:project_id)
|
|
|
|
@query_spec = args[:query_spec] if args.key?(:query_spec)
|
|
|
|
@table_spec = args[:table_spec] if args.key?(:table_spec)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
# Specifies a custom BigQuery query.
|
|
|
|
class BigQueryQuerySpec
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
|
|
|
# The raw query string.
|
|
|
|
# Corresponds to the JSON property `rawQuery`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :raw_query
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@raw_query = args[:raw_query] if args.key?(:raw_query)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2020-09-29 00:38:39 +00:00
|
|
|
# Specifies a BigQuery table definition. Only [native tables](https://cloud.
|
|
|
|
# google.com/bigquery/docs/tables-intro) is allowed.
|
2020-08-28 00:38:58 +00:00
|
|
|
class BigQueryTableSpec
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
|
|
|
# The BigQuery dataset id.
|
|
|
|
# Corresponds to the JSON property `datasetId`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :dataset_id
|
|
|
|
|
|
|
|
# The BigQuery table id.
|
|
|
|
# Corresponds to the JSON property `tableId`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :table_id
|
|
|
|
|
|
|
|
# The ID of a BigQuery project the table belongs to. If not specified, the
|
|
|
|
# project_id is assumed.
|
|
|
|
# Corresponds to the JSON property `tableProjectId`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :table_project_id
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@dataset_id = args[:dataset_id] if args.key?(:dataset_id)
|
|
|
|
@table_id = args[:table_id] if args.key?(:table_id)
|
|
|
|
@table_project_id = args[:table_project_id] if args.key?(:table_project_id)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# A condition that can evaluate to true or false. BooleanConditions are used by
|
|
|
|
# conditional formatting, data validation, and the criteria in filters.
|
2017-08-25 19:54:22 +00:00
|
|
|
class BooleanCondition
|
2017-05-26 16:44:32 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The type of condition.
|
|
|
|
# Corresponds to the JSON property `type`
|
2017-07-12 20:10:42 +00:00
|
|
|
# @return [String]
|
2017-08-25 19:54:22 +00:00
|
|
|
attr_accessor :type
|
2017-07-12 20:10:42 +00:00
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The values of the condition. The number of supported values depends on the
|
|
|
|
# condition type. Some support zero values, others one or two values, and
|
|
|
|
# ConditionType.ONE_OF_LIST supports an arbitrary number of values.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `values`
|
|
|
|
# @return [Array<Google::Apis::SheetsV4::ConditionValue>]
|
2017-07-12 20:10:42 +00:00
|
|
|
attr_accessor :values
|
|
|
|
|
2017-05-26 16:44:32 +00:00
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@type = args[:type] if args.key?(:type)
|
2017-07-12 20:10:42 +00:00
|
|
|
@values = args[:values] if args.key?(:values)
|
2017-05-26 16:44:32 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# A rule that may or may not match, depending on the condition.
|
|
|
|
class BooleanRule
|
2017-05-26 16:44:32 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# A condition that can evaluate to true or false. BooleanConditions are used by
|
|
|
|
# conditional formatting, data validation, and the criteria in filters.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `condition`
|
|
|
|
# @return [Google::Apis::SheetsV4::BooleanCondition]
|
|
|
|
attr_accessor :condition
|
|
|
|
|
|
|
|
# The format of a cell.
|
|
|
|
# Corresponds to the JSON property `format`
|
|
|
|
# @return [Google::Apis::SheetsV4::CellFormat]
|
|
|
|
attr_accessor :format
|
2017-02-03 19:29:28 +00:00
|
|
|
|
2017-03-30 22:30:51 +00:00
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
2017-02-03 19:29:28 +00:00
|
|
|
|
2017-03-30 22:30:51 +00:00
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@condition = args[:condition] if args.key?(:condition)
|
|
|
|
@format = args[:format] if args.key?(:format)
|
2017-03-30 22:30:51 +00:00
|
|
|
end
|
|
|
|
end
|
2017-03-10 21:11:09 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# A border along a cell.
|
|
|
|
class Border
|
2017-03-30 22:30:51 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
2017-02-13 23:28:52 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Represents a color in the RGBA color space. This representation is designed
|
|
|
|
# for simplicity of conversion to/from color representations in various
|
2020-08-18 00:38:22 +00:00
|
|
|
# languages over compactness; for example, the fields of this representation can
|
|
|
|
# be trivially provided to the constructor of "java.awt.Color" in Java; it can
|
|
|
|
# also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
|
|
|
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
|
|
|
# CSS "rgba()" string in JavaScript, as well. Note: this proto does not carry
|
|
|
|
# information about the absolute color space that should be used to interpret
|
|
|
|
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
|
|
|
# applications SHOULD assume the sRGB color space. Note: when color equality
|
|
|
|
# needs to be decided, implementations, unless documented otherwise, will treat
|
|
|
|
# two colors to be equal if all their red, green, blue and alpha values each
|
|
|
|
# differ by at most 1e-5. 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(''); `; // ...
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `color`
|
|
|
|
# @return [Google::Apis::SheetsV4::Color]
|
|
|
|
attr_accessor :color
|
2017-07-12 20:10:42 +00:00
|
|
|
|
2020-02-05 00:37:38 +00:00
|
|
|
# A color value.
|
|
|
|
# Corresponds to the JSON property `colorStyle`
|
|
|
|
# @return [Google::Apis::SheetsV4::ColorStyle]
|
|
|
|
attr_accessor :color_style
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The style of the border.
|
|
|
|
# Corresponds to the JSON property `style`
|
2017-07-12 20:10:42 +00:00
|
|
|
# @return [String]
|
2017-08-25 19:54:22 +00:00
|
|
|
attr_accessor :style
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The width of the border, in pixels. Deprecated; the width is determined by the
|
|
|
|
# "style" field.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `width`
|
|
|
|
# @return [Fixnum]
|
|
|
|
attr_accessor :width
|
2017-02-03 19:29:28 +00:00
|
|
|
|
2017-05-26 16:44:32 +00:00
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@color = args[:color] if args.key?(:color)
|
2020-02-05 00:37:38 +00:00
|
|
|
@color_style = args[:color_style] if args.key?(:color_style)
|
2017-08-25 19:54:22 +00:00
|
|
|
@style = args[:style] if args.key?(:style)
|
|
|
|
@width = args[:width] if args.key?(:width)
|
2017-05-26 16:44:32 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The borders of the cell.
|
|
|
|
class Borders
|
2017-05-26 16:44:32 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# A border along a cell.
|
|
|
|
# Corresponds to the JSON property `bottom`
|
|
|
|
# @return [Google::Apis::SheetsV4::Border]
|
|
|
|
attr_accessor :bottom
|
2017-07-12 20:10:42 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# A border along a cell.
|
|
|
|
# Corresponds to the JSON property `left`
|
|
|
|
# @return [Google::Apis::SheetsV4::Border]
|
|
|
|
attr_accessor :left
|
2017-06-14 17:02:03 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# A border along a cell.
|
|
|
|
# Corresponds to the JSON property `right`
|
|
|
|
# @return [Google::Apis::SheetsV4::Border]
|
|
|
|
attr_accessor :right
|
2017-05-26 16:44:32 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# A border along a cell.
|
|
|
|
# Corresponds to the JSON property `top`
|
|
|
|
# @return [Google::Apis::SheetsV4::Border]
|
|
|
|
attr_accessor :top
|
2017-06-02 06:11:31 +00:00
|
|
|
|
2017-03-10 21:11:09 +00:00
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
2016-05-16 16:49:15 +00:00
|
|
|
|
2017-03-10 21:11:09 +00:00
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@bottom = args[:bottom] if args.key?(:bottom)
|
|
|
|
@left = args[:left] if args.key?(:left)
|
|
|
|
@right = args[:right] if args.key?(:right)
|
|
|
|
@top = args[:top] if args.key?(:top)
|
2017-03-10 21:11:09 +00:00
|
|
|
end
|
|
|
|
end
|
2016-05-16 16:49:15 +00:00
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# A bubble chart.
|
2017-08-25 19:54:22 +00:00
|
|
|
class BubbleChartSpec
|
2017-03-10 21:11:09 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
2016-05-16 16:49:15 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Represents a color in the RGBA color space. This representation is designed
|
|
|
|
# for simplicity of conversion to/from color representations in various
|
2020-08-18 00:38:22 +00:00
|
|
|
# languages over compactness; for example, the fields of this representation can
|
|
|
|
# be trivially provided to the constructor of "java.awt.Color" in Java; it can
|
|
|
|
# also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
|
|
|
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
|
|
|
# CSS "rgba()" string in JavaScript, as well. Note: this proto does not carry
|
|
|
|
# information about the absolute color space that should be used to interpret
|
|
|
|
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
|
|
|
# applications SHOULD assume the sRGB color space. Note: when color equality
|
|
|
|
# needs to be decided, implementations, unless documented otherwise, will treat
|
|
|
|
# two colors to be equal if all their red, green, blue and alpha values each
|
|
|
|
# differ by at most 1e-5. 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(''); `; // ...
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `bubbleBorderColor`
|
|
|
|
# @return [Google::Apis::SheetsV4::Color]
|
|
|
|
attr_accessor :bubble_border_color
|
2017-07-12 20:10:42 +00:00
|
|
|
|
2020-01-25 00:37:19 +00:00
|
|
|
# A color value.
|
|
|
|
# Corresponds to the JSON property `bubbleBorderColorStyle`
|
|
|
|
# @return [Google::Apis::SheetsV4::ColorStyle]
|
|
|
|
attr_accessor :bubble_border_color_style
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The data included in a domain or series.
|
|
|
|
# Corresponds to the JSON property `bubbleLabels`
|
|
|
|
# @return [Google::Apis::SheetsV4::ChartData]
|
|
|
|
attr_accessor :bubble_labels
|
2017-07-12 20:10:42 +00:00
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The max radius size of the bubbles, in pixels. If specified, the field must be
|
|
|
|
# a positive value.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `bubbleMaxRadiusSize`
|
|
|
|
# @return [Fixnum]
|
|
|
|
attr_accessor :bubble_max_radius_size
|
2017-07-12 20:10:42 +00:00
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The minimum radius size of the bubbles, in pixels. If specific, the field must
|
|
|
|
# be a positive value.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `bubbleMinRadiusSize`
|
|
|
|
# @return [Fixnum]
|
|
|
|
attr_accessor :bubble_min_radius_size
|
2017-07-12 20:10:42 +00:00
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The opacity of the bubbles between 0 and 1.0. 0 is fully transparent and 1 is
|
|
|
|
# fully opaque.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `bubbleOpacity`
|
|
|
|
# @return [Float]
|
|
|
|
attr_accessor :bubble_opacity
|
2017-07-12 20:10:42 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The data included in a domain or series.
|
|
|
|
# Corresponds to the JSON property `bubbleSizes`
|
|
|
|
# @return [Google::Apis::SheetsV4::ChartData]
|
|
|
|
attr_accessor :bubble_sizes
|
2017-07-12 20:10:42 +00:00
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The format of a run of text in a cell. Absent values indicate that the field
|
|
|
|
# isn't specified.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `bubbleTextStyle`
|
|
|
|
# @return [Google::Apis::SheetsV4::TextFormat]
|
|
|
|
attr_accessor :bubble_text_style
|
2017-07-12 20:10:42 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The data included in a domain or series.
|
|
|
|
# Corresponds to the JSON property `domain`
|
|
|
|
# @return [Google::Apis::SheetsV4::ChartData]
|
|
|
|
attr_accessor :domain
|
2017-07-12 20:10:42 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The data included in a domain or series.
|
|
|
|
# Corresponds to the JSON property `groupIds`
|
|
|
|
# @return [Google::Apis::SheetsV4::ChartData]
|
|
|
|
attr_accessor :group_ids
|
2017-07-12 20:10:42 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Where the legend of the chart should be drawn.
|
|
|
|
# Corresponds to the JSON property `legendPosition`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :legend_position
|
2017-07-12 20:10:42 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The data included in a domain or series.
|
|
|
|
# Corresponds to the JSON property `series`
|
|
|
|
# @return [Google::Apis::SheetsV4::ChartData]
|
|
|
|
attr_accessor :series
|
2017-06-02 06:11:31 +00:00
|
|
|
|
2017-03-31 19:53:27 +00:00
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@bubble_border_color = args[:bubble_border_color] if args.key?(:bubble_border_color)
|
2020-01-25 00:37:19 +00:00
|
|
|
@bubble_border_color_style = args[:bubble_border_color_style] if args.key?(:bubble_border_color_style)
|
2017-08-25 19:54:22 +00:00
|
|
|
@bubble_labels = args[:bubble_labels] if args.key?(:bubble_labels)
|
|
|
|
@bubble_max_radius_size = args[:bubble_max_radius_size] if args.key?(:bubble_max_radius_size)
|
|
|
|
@bubble_min_radius_size = args[:bubble_min_radius_size] if args.key?(:bubble_min_radius_size)
|
|
|
|
@bubble_opacity = args[:bubble_opacity] if args.key?(:bubble_opacity)
|
|
|
|
@bubble_sizes = args[:bubble_sizes] if args.key?(:bubble_sizes)
|
|
|
|
@bubble_text_style = args[:bubble_text_style] if args.key?(:bubble_text_style)
|
|
|
|
@domain = args[:domain] if args.key?(:domain)
|
|
|
|
@group_ids = args[:group_ids] if args.key?(:group_ids)
|
|
|
|
@legend_position = args[:legend_position] if args.key?(:legend_position)
|
|
|
|
@series = args[:series] if args.key?(:series)
|
2017-04-03 20:18:48 +00:00
|
|
|
end
|
2017-03-31 19:53:27 +00:00
|
|
|
end
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# A candlestick chart.
|
2017-08-25 19:54:22 +00:00
|
|
|
class CandlestickChartSpec
|
2017-03-31 19:53:27 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The Candlestick chart data. Only one CandlestickData is supported.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `data`
|
|
|
|
# @return [Array<Google::Apis::SheetsV4::CandlestickData>]
|
|
|
|
attr_accessor :data
|
2017-06-14 17:02:03 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The domain of a CandlestickChart.
|
|
|
|
# Corresponds to the JSON property `domain`
|
|
|
|
# @return [Google::Apis::SheetsV4::CandlestickDomain]
|
|
|
|
attr_accessor :domain
|
2017-03-31 19:53:27 +00:00
|
|
|
|
2017-04-03 20:18:48 +00:00
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
2017-03-31 19:53:27 +00:00
|
|
|
|
2017-04-03 20:18:48 +00:00
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@data = args[:data] if args.key?(:data)
|
|
|
|
@domain = args[:domain] if args.key?(:domain)
|
2017-04-03 20:18:48 +00:00
|
|
|
end
|
|
|
|
end
|
2017-03-31 19:53:27 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The Candlestick chart data, each containing the low, open, close, and high
|
|
|
|
# values for a series.
|
|
|
|
class CandlestickData
|
2017-04-03 20:18:48 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The series of a CandlestickData.
|
|
|
|
# Corresponds to the JSON property `closeSeries`
|
|
|
|
# @return [Google::Apis::SheetsV4::CandlestickSeries]
|
|
|
|
attr_accessor :close_series
|
2017-07-12 20:10:42 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The series of a CandlestickData.
|
|
|
|
# Corresponds to the JSON property `highSeries`
|
|
|
|
# @return [Google::Apis::SheetsV4::CandlestickSeries]
|
|
|
|
attr_accessor :high_series
|
|
|
|
|
|
|
|
# The series of a CandlestickData.
|
|
|
|
# Corresponds to the JSON property `lowSeries`
|
|
|
|
# @return [Google::Apis::SheetsV4::CandlestickSeries]
|
|
|
|
attr_accessor :low_series
|
|
|
|
|
|
|
|
# The series of a CandlestickData.
|
|
|
|
# Corresponds to the JSON property `openSeries`
|
|
|
|
# @return [Google::Apis::SheetsV4::CandlestickSeries]
|
|
|
|
attr_accessor :open_series
|
2017-04-03 20:18:48 +00:00
|
|
|
|
2017-05-04 19:35:56 +00:00
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
2017-04-03 20:18:48 +00:00
|
|
|
|
2017-05-04 19:35:56 +00:00
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@close_series = args[:close_series] if args.key?(:close_series)
|
|
|
|
@high_series = args[:high_series] if args.key?(:high_series)
|
|
|
|
@low_series = args[:low_series] if args.key?(:low_series)
|
|
|
|
@open_series = args[:open_series] if args.key?(:open_series)
|
2017-05-04 19:35:56 +00:00
|
|
|
end
|
|
|
|
end
|
2017-04-03 20:18:48 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The domain of a CandlestickChart.
|
|
|
|
class CandlestickDomain
|
2017-05-04 19:35:56 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
2017-04-03 20:18:48 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The data included in a domain or series.
|
|
|
|
# Corresponds to the JSON property `data`
|
|
|
|
# @return [Google::Apis::SheetsV4::ChartData]
|
|
|
|
attr_accessor :data
|
2017-07-12 20:10:42 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# True to reverse the order of the domain values (horizontal axis).
|
|
|
|
# Corresponds to the JSON property `reversed`
|
|
|
|
# @return [Boolean]
|
|
|
|
attr_accessor :reversed
|
|
|
|
alias_method :reversed?, :reversed
|
2017-03-31 19:53:27 +00:00
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@data = args[:data] if args.key?(:data)
|
|
|
|
@reversed = args[:reversed] if args.key?(:reversed)
|
2017-03-31 19:53:27 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The series of a CandlestickData.
|
|
|
|
class CandlestickSeries
|
2017-04-03 20:18:48 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
2017-03-31 19:53:27 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The data included in a domain or series.
|
|
|
|
# Corresponds to the JSON property `data`
|
|
|
|
# @return [Google::Apis::SheetsV4::ChartData]
|
|
|
|
attr_accessor :data
|
2017-03-31 19:53:27 +00:00
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@data = args[:data] if args.key?(:data)
|
2017-03-31 19:53:27 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Data about a specific cell.
|
|
|
|
class CellData
|
2017-06-02 06:11:31 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2020-08-28 00:38:58 +00:00
|
|
|
# A data source formula.
|
|
|
|
# Corresponds to the JSON property `dataSourceFormula`
|
|
|
|
# @return [Google::Apis::SheetsV4::DataSourceFormula]
|
|
|
|
attr_accessor :data_source_formula
|
|
|
|
|
2020-09-29 00:38:39 +00:00
|
|
|
# A data source table, which allows the user to import a static table of data
|
|
|
|
# from the DataSource into Sheets. This is also known as "Extract" in the Sheets
|
|
|
|
# editor.
|
2020-08-28 00:38:58 +00:00
|
|
|
# Corresponds to the JSON property `dataSourceTable`
|
|
|
|
# @return [Google::Apis::SheetsV4::DataSourceTable]
|
|
|
|
attr_accessor :data_source_table
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# A data validation rule.
|
|
|
|
# Corresponds to the JSON property `dataValidation`
|
|
|
|
# @return [Google::Apis::SheetsV4::DataValidationRule]
|
|
|
|
attr_accessor :data_validation
|
|
|
|
|
|
|
|
# The format of a cell.
|
|
|
|
# Corresponds to the JSON property `effectiveFormat`
|
|
|
|
# @return [Google::Apis::SheetsV4::CellFormat]
|
|
|
|
attr_accessor :effective_format
|
|
|
|
|
|
|
|
# The kinds of value that a cell in a spreadsheet can have.
|
|
|
|
# Corresponds to the JSON property `effectiveValue`
|
|
|
|
# @return [Google::Apis::SheetsV4::ExtendedValue]
|
|
|
|
attr_accessor :effective_value
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The formatted value of the cell. This is the value as it's shown to the user.
|
2017-08-25 19:54:22 +00:00
|
|
|
# This field is read-only.
|
|
|
|
# Corresponds to the JSON property `formattedValue`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :formatted_value
|
|
|
|
|
feat: Automated regeneration of sheets v4 client (#1404)
This PR was generated using Autosynth. :rainbow:
<details><summary>Log from Synthtool</summary>
```
2020-11-05 03:15:23,076 synthtool [DEBUG] > Executing /home/kbuilder/.cache/synthtool/google-api-ruby-client/synth.py.
On branch autosynth-sheets-v4
nothing to commit, working tree clean
2020-11-05 03:15:23,105 synthtool [DEBUG] > Running: docker run --rm -v/home/kbuilder/.cache/synthtool/google-api-ruby-client:/workspace -v/var/run/docker.sock:/var/run/docker.sock -w /workspace --entrypoint script/synth.rb gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/autosynth sheets v4
DEBUG:synthtool:Running: docker run --rm -v/home/kbuilder/.cache/synthtool/google-api-ruby-client:/workspace -v/var/run/docker.sock:/var/run/docker.sock -w /workspace --entrypoint script/synth.rb gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/autosynth sheets v4
bundle install
Don't run Bundler as root. Bundler can ask for sudo if it is needed, and
installing your bundle as root will break this application for all non-root
users on this machine.
The dependency jruby-openssl (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for java. To add those platforms to the bundle, run `bundle lock --add-platform java`.
Fetching gem metadata from https://rubygems.org/.........
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies...
Fetching rake 11.3.0
Installing rake 11.3.0
Fetching concurrent-ruby 1.1.7
Installing concurrent-ruby 1.1.7
Fetching i18n 1.8.5
Installing i18n 1.8.5
Fetching minitest 5.14.2
Installing minitest 5.14.2
Fetching thread_safe 0.3.6
Installing thread_safe 0.3.6
Fetching tzinfo 1.2.7
Installing tzinfo 1.2.7
Fetching activesupport 5.0.7.2
Installing activesupport 5.0.7.2
Fetching public_suffix 4.0.6
Installing public_suffix 4.0.6
Fetching addressable 2.7.0
Installing addressable 2.7.0
Fetching ast 2.4.1
Installing ast 2.4.1
Using bundler 2.1.4
Fetching byebug 11.1.3
Installing byebug 11.1.3 with native extensions
Fetching coderay 1.1.3
Installing coderay 1.1.3
Fetching json 2.3.1
Installing json 2.3.1 with native extensions
Fetching docile 1.3.2
Installing docile 1.3.2
Fetching simplecov-html 0.10.2
Installing simplecov-html 0.10.2
Fetching simplecov 0.16.1
Installing simplecov 0.16.1
Using sync 0.5.0
Fetching tins 1.26.0
Installing tins 1.26.0
Fetching term-ansicolor 1.7.1
Installing term-ansicolor 1.7.1
Fetching thor 0.20.3
Installing thor 0.20.3
Fetching coveralls 0.8.23
Installing coveralls 0.8.23
Fetching crack 0.4.4
Installing crack 0.4.4
Fetching declarative 0.0.20
Installing declarative 0.0.20
Fetching declarative-option 0.1.0
Installing declarative-option 0.1.0
Fetching diff-lcs 1.4.4
Installing diff-lcs 1.4.4
Fetching dotenv 2.7.6
Installing dotenv 2.7.6
Fetching fakefs 0.20.1
Installing fakefs 0.20.1
Fetching multipart-post 2.1.1
Installing multipart-post 2.1.1
Fetching ruby2_keywords 0.0.2
Installing ruby2_keywords 0.0.2
Fetching faraday 1.1.0
Installing faraday 1.1.0
Fetching gems 1.2.0
Installing gems 1.2.0
Fetching github-markup 1.7.0
Installing github-markup 1.7.0
Fetching jwt 2.2.2
Installing jwt 2.2.2
Fetching memoist 0.16.2
Installing memoist 0.16.2
Fetching multi_json 1.15.0
Installing multi_json 1.15.0
Fetching os 0.9.6
Installing os 0.9.6
Fetching signet 0.14.0
Installing signet 0.14.0
Fetching googleauth 0.14.0
Installing googleauth 0.14.0
Fetching httpclient 2.8.3
Installing httpclient 2.8.3
Fetching mini_mime 1.0.2
Installing mini_mime 1.0.2
Fetching uber 0.1.0
Installing uber 0.1.0
Fetching representable 3.0.4
Installing representable 3.0.4
Fetching retriable 3.1.2
Installing retriable 3.1.2
Fetching rexml 3.2.4
Installing rexml 3.2.4
Using google-api-client 0.48.0 from source at `.`
Fetching google-id-token 1.4.2
Installing google-id-token 1.4.2
Fetching hashdiff 1.0.1
Installing hashdiff 1.0.1
Fetching mime-types-data 3.2020.1104
Installing mime-types-data 3.2020.1104
Fetching mime-types 3.3.1
Installing mime-types 3.3.1
Fetching multi_xml 0.6.0
Installing multi_xml 0.6.0
Fetching httparty 0.18.1
Installing httparty 0.18.1
Fetching rspec-support 3.10.0
Installing rspec-support 3.10.0
Fetching rspec-core 3.10.0
Installing rspec-core 3.10.0
Fetching rspec-expectations 3.10.0
Installing rspec-expectations 3.10.0
Fetching rspec-mocks 3.10.0
Installing rspec-mocks 3.10.0
Fetching rspec 3.10.0
Installing rspec 3.10.0
Fetching json_spec 1.1.5
Installing json_spec 1.1.5
Fetching launchy 2.5.0
Installing launchy 2.5.0
Fetching little-plugger 1.1.4
Installing little-plugger 1.1.4
Fetching logging 2.3.0
Installing logging 2.3.0
Fetching method_source 1.0.0
Installing method_source 1.0.0
Fetching opencensus 0.5.0
Installing opencensus 0.5.0
Fetching parallel 1.19.2
Installing parallel 1.19.2
Fetching parser 2.7.2.0
Installing parser 2.7.2.0
Fetching powerpack 0.1.2
Installing powerpack 0.1.2
Fetching pry 0.13.1
Installing pry 0.13.1
Fetching pry-byebug 3.9.0
Installing pry-byebug 3.9.0
Fetching yard 0.9.25
Installing yard 0.9.25
Fetching pry-doc 0.13.5
Installing pry-doc 0.13.5
Fetching rainbow 2.2.2
Installing rainbow 2.2.2 with native extensions
Fetching redcarpet 3.5.0
Installing redcarpet 3.5.0 with native extensions
Fetching redis 3.3.5
Installing redis 3.3.5
Fetching rmail 1.1.4
Installing rmail 1.1.4
Fetching ruby-progressbar 1.10.1
Installing ruby-progressbar 1.10.1
Fetching unicode-display_width 1.7.0
Installing unicode-display_width 1.7.0
Fetching rubocop 0.49.1
Installing rubocop 0.49.1
Fetching webmock 2.3.2
Installing webmock 2.3.2
Bundle complete! 31 Gemfile dependencies, 78 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
Post-install message from i18n:
HEADS UP! i18n 1.1 changed fallbacks to exclude default locale.
But that may break your application.
If you are upgrading your Rails application from an older version of Rails:
Please check your Rails app for 'config.i18n.fallbacks = true'.
If you're using I18n (>= 1.1.0) and Rails (< 5.2.2), this should be
'config.i18n.fallbacks = [I18n.default_locale]'.
If not, fallbacks will be broken in your app by I18n 1.1.x.
If you are starting a NEW Rails application, you can ignore this notice.
For more info see:
https://github.com/svenfuchs/i18n/releases/tag/v1.1.0
Post-install message from httparty:
When you HTTParty, you must party hard!
echo a | bundle exec bin/generate-api gen generated --api=sheets.v4 --names-out=/workspace/api_names_out.yaml
Loading sheets, version v4 from https://raw.githubusercontent.com/googleapis/discovery-artifact-manager/master/discoveries/sheets.v4.json
W, [2020-11-05T11:15:45.091678 #240] WARN -- : Found reserved property 'object_id'
W, [2020-11-05T11:15:45.091750 #240] WARN -- : Changed to 'object_id_prop'
W, [2020-11-05T11:15:45.107227 #240] WARN -- : Found reserved property 'object_id'
W, [2020-11-05T11:15:45.107277 #240] WARN -- : Changed to 'object_id_prop'
conflict google/apis/sheets_v4.rb
</apis/sheets_v4.rb? (enter "h" for help) [Ynaqdhm] a
force google/apis/sheets_v4.rb
identical google/apis/sheets_v4/service.rb
conflict google/apis/sheets_v4/classes.rb
force google/apis/sheets_v4/classes.rb
conflict google/apis/sheets_v4/representations.rb
force google/apis/sheets_v4/representations.rb
conflict /workspace/api_names_out.yaml
force /workspace/api_names_out.yaml
2020-11-05 03:15:50,065 synthtool [DEBUG] > Wrote metadata to generated/google/apis/sheets_v4/synth.metadata.
DEBUG:synthtool:Wrote metadata to generated/google/apis/sheets_v4/synth.metadata.
```
</details>
Full log will be available here:
https://source.cloud.google.com/results/invocations/749223e1-0b80-43a0-be68-640be14dbb8a/targets
- [ ] To automatically regenerate this PR, check this box.
2020-11-05 11:32:02 +00:00
|
|
|
# A hyperlink this cell points to, if any. If the cell contains multiple
|
|
|
|
# hyperlinks, this field will be empty. This field is read-only. To set it, use
|
|
|
|
# a `=HYPERLINK` formula in the userEnteredValue.formulaValue field.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `hyperlink`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :hyperlink
|
|
|
|
|
|
|
|
# Any note on the cell.
|
|
|
|
# Corresponds to the JSON property `note`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :note
|
|
|
|
|
|
|
|
# A pivot table.
|
|
|
|
# Corresponds to the JSON property `pivotTable`
|
|
|
|
# @return [Google::Apis::SheetsV4::PivotTable]
|
|
|
|
attr_accessor :pivot_table
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# Runs of rich text applied to subsections of the cell. Runs are only valid on
|
feat: Automated regeneration of sheets v4 client (#1404)
This PR was generated using Autosynth. :rainbow:
<details><summary>Log from Synthtool</summary>
```
2020-11-05 03:15:23,076 synthtool [DEBUG] > Executing /home/kbuilder/.cache/synthtool/google-api-ruby-client/synth.py.
On branch autosynth-sheets-v4
nothing to commit, working tree clean
2020-11-05 03:15:23,105 synthtool [DEBUG] > Running: docker run --rm -v/home/kbuilder/.cache/synthtool/google-api-ruby-client:/workspace -v/var/run/docker.sock:/var/run/docker.sock -w /workspace --entrypoint script/synth.rb gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/autosynth sheets v4
DEBUG:synthtool:Running: docker run --rm -v/home/kbuilder/.cache/synthtool/google-api-ruby-client:/workspace -v/var/run/docker.sock:/var/run/docker.sock -w /workspace --entrypoint script/synth.rb gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/autosynth sheets v4
bundle install
Don't run Bundler as root. Bundler can ask for sudo if it is needed, and
installing your bundle as root will break this application for all non-root
users on this machine.
The dependency jruby-openssl (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for java. To add those platforms to the bundle, run `bundle lock --add-platform java`.
Fetching gem metadata from https://rubygems.org/.........
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies...
Fetching rake 11.3.0
Installing rake 11.3.0
Fetching concurrent-ruby 1.1.7
Installing concurrent-ruby 1.1.7
Fetching i18n 1.8.5
Installing i18n 1.8.5
Fetching minitest 5.14.2
Installing minitest 5.14.2
Fetching thread_safe 0.3.6
Installing thread_safe 0.3.6
Fetching tzinfo 1.2.7
Installing tzinfo 1.2.7
Fetching activesupport 5.0.7.2
Installing activesupport 5.0.7.2
Fetching public_suffix 4.0.6
Installing public_suffix 4.0.6
Fetching addressable 2.7.0
Installing addressable 2.7.0
Fetching ast 2.4.1
Installing ast 2.4.1
Using bundler 2.1.4
Fetching byebug 11.1.3
Installing byebug 11.1.3 with native extensions
Fetching coderay 1.1.3
Installing coderay 1.1.3
Fetching json 2.3.1
Installing json 2.3.1 with native extensions
Fetching docile 1.3.2
Installing docile 1.3.2
Fetching simplecov-html 0.10.2
Installing simplecov-html 0.10.2
Fetching simplecov 0.16.1
Installing simplecov 0.16.1
Using sync 0.5.0
Fetching tins 1.26.0
Installing tins 1.26.0
Fetching term-ansicolor 1.7.1
Installing term-ansicolor 1.7.1
Fetching thor 0.20.3
Installing thor 0.20.3
Fetching coveralls 0.8.23
Installing coveralls 0.8.23
Fetching crack 0.4.4
Installing crack 0.4.4
Fetching declarative 0.0.20
Installing declarative 0.0.20
Fetching declarative-option 0.1.0
Installing declarative-option 0.1.0
Fetching diff-lcs 1.4.4
Installing diff-lcs 1.4.4
Fetching dotenv 2.7.6
Installing dotenv 2.7.6
Fetching fakefs 0.20.1
Installing fakefs 0.20.1
Fetching multipart-post 2.1.1
Installing multipart-post 2.1.1
Fetching ruby2_keywords 0.0.2
Installing ruby2_keywords 0.0.2
Fetching faraday 1.1.0
Installing faraday 1.1.0
Fetching gems 1.2.0
Installing gems 1.2.0
Fetching github-markup 1.7.0
Installing github-markup 1.7.0
Fetching jwt 2.2.2
Installing jwt 2.2.2
Fetching memoist 0.16.2
Installing memoist 0.16.2
Fetching multi_json 1.15.0
Installing multi_json 1.15.0
Fetching os 0.9.6
Installing os 0.9.6
Fetching signet 0.14.0
Installing signet 0.14.0
Fetching googleauth 0.14.0
Installing googleauth 0.14.0
Fetching httpclient 2.8.3
Installing httpclient 2.8.3
Fetching mini_mime 1.0.2
Installing mini_mime 1.0.2
Fetching uber 0.1.0
Installing uber 0.1.0
Fetching representable 3.0.4
Installing representable 3.0.4
Fetching retriable 3.1.2
Installing retriable 3.1.2
Fetching rexml 3.2.4
Installing rexml 3.2.4
Using google-api-client 0.48.0 from source at `.`
Fetching google-id-token 1.4.2
Installing google-id-token 1.4.2
Fetching hashdiff 1.0.1
Installing hashdiff 1.0.1
Fetching mime-types-data 3.2020.1104
Installing mime-types-data 3.2020.1104
Fetching mime-types 3.3.1
Installing mime-types 3.3.1
Fetching multi_xml 0.6.0
Installing multi_xml 0.6.0
Fetching httparty 0.18.1
Installing httparty 0.18.1
Fetching rspec-support 3.10.0
Installing rspec-support 3.10.0
Fetching rspec-core 3.10.0
Installing rspec-core 3.10.0
Fetching rspec-expectations 3.10.0
Installing rspec-expectations 3.10.0
Fetching rspec-mocks 3.10.0
Installing rspec-mocks 3.10.0
Fetching rspec 3.10.0
Installing rspec 3.10.0
Fetching json_spec 1.1.5
Installing json_spec 1.1.5
Fetching launchy 2.5.0
Installing launchy 2.5.0
Fetching little-plugger 1.1.4
Installing little-plugger 1.1.4
Fetching logging 2.3.0
Installing logging 2.3.0
Fetching method_source 1.0.0
Installing method_source 1.0.0
Fetching opencensus 0.5.0
Installing opencensus 0.5.0
Fetching parallel 1.19.2
Installing parallel 1.19.2
Fetching parser 2.7.2.0
Installing parser 2.7.2.0
Fetching powerpack 0.1.2
Installing powerpack 0.1.2
Fetching pry 0.13.1
Installing pry 0.13.1
Fetching pry-byebug 3.9.0
Installing pry-byebug 3.9.0
Fetching yard 0.9.25
Installing yard 0.9.25
Fetching pry-doc 0.13.5
Installing pry-doc 0.13.5
Fetching rainbow 2.2.2
Installing rainbow 2.2.2 with native extensions
Fetching redcarpet 3.5.0
Installing redcarpet 3.5.0 with native extensions
Fetching redis 3.3.5
Installing redis 3.3.5
Fetching rmail 1.1.4
Installing rmail 1.1.4
Fetching ruby-progressbar 1.10.1
Installing ruby-progressbar 1.10.1
Fetching unicode-display_width 1.7.0
Installing unicode-display_width 1.7.0
Fetching rubocop 0.49.1
Installing rubocop 0.49.1
Fetching webmock 2.3.2
Installing webmock 2.3.2
Bundle complete! 31 Gemfile dependencies, 78 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
Post-install message from i18n:
HEADS UP! i18n 1.1 changed fallbacks to exclude default locale.
But that may break your application.
If you are upgrading your Rails application from an older version of Rails:
Please check your Rails app for 'config.i18n.fallbacks = true'.
If you're using I18n (>= 1.1.0) and Rails (< 5.2.2), this should be
'config.i18n.fallbacks = [I18n.default_locale]'.
If not, fallbacks will be broken in your app by I18n 1.1.x.
If you are starting a NEW Rails application, you can ignore this notice.
For more info see:
https://github.com/svenfuchs/i18n/releases/tag/v1.1.0
Post-install message from httparty:
When you HTTParty, you must party hard!
echo a | bundle exec bin/generate-api gen generated --api=sheets.v4 --names-out=/workspace/api_names_out.yaml
Loading sheets, version v4 from https://raw.githubusercontent.com/googleapis/discovery-artifact-manager/master/discoveries/sheets.v4.json
W, [2020-11-05T11:15:45.091678 #240] WARN -- : Found reserved property 'object_id'
W, [2020-11-05T11:15:45.091750 #240] WARN -- : Changed to 'object_id_prop'
W, [2020-11-05T11:15:45.107227 #240] WARN -- : Found reserved property 'object_id'
W, [2020-11-05T11:15:45.107277 #240] WARN -- : Changed to 'object_id_prop'
conflict google/apis/sheets_v4.rb
</apis/sheets_v4.rb? (enter "h" for help) [Ynaqdhm] a
force google/apis/sheets_v4.rb
identical google/apis/sheets_v4/service.rb
conflict google/apis/sheets_v4/classes.rb
force google/apis/sheets_v4/classes.rb
conflict google/apis/sheets_v4/representations.rb
force google/apis/sheets_v4/representations.rb
conflict /workspace/api_names_out.yaml
force /workspace/api_names_out.yaml
2020-11-05 03:15:50,065 synthtool [DEBUG] > Wrote metadata to generated/google/apis/sheets_v4/synth.metadata.
DEBUG:synthtool:Wrote metadata to generated/google/apis/sheets_v4/synth.metadata.
```
</details>
Full log will be available here:
https://source.cloud.google.com/results/invocations/749223e1-0b80-43a0-be68-640be14dbb8a/targets
- [ ] To automatically regenerate this PR, check this box.
2020-11-05 11:32:02 +00:00
|
|
|
# user entered strings, not formulas, bools, or numbers. Properties of a run
|
|
|
|
# start at a specific index in the text and continue until the next run. Runs
|
|
|
|
# will inherit the properties of the cell unless explicitly changed. When
|
|
|
|
# writing, the new runs will overwrite any prior runs. When writing a new
|
2020-08-18 00:38:22 +00:00
|
|
|
# user_entered_value, previous runs are erased.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `textFormatRuns`
|
|
|
|
# @return [Array<Google::Apis::SheetsV4::TextFormatRun>]
|
|
|
|
attr_accessor :text_format_runs
|
|
|
|
|
|
|
|
# The format of a cell.
|
|
|
|
# Corresponds to the JSON property `userEnteredFormat`
|
|
|
|
# @return [Google::Apis::SheetsV4::CellFormat]
|
|
|
|
attr_accessor :user_entered_format
|
|
|
|
|
|
|
|
# The kinds of value that a cell in a spreadsheet can have.
|
|
|
|
# Corresponds to the JSON property `userEnteredValue`
|
|
|
|
# @return [Google::Apis::SheetsV4::ExtendedValue]
|
|
|
|
attr_accessor :user_entered_value
|
2017-06-02 06:11:31 +00:00
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2020-08-28 00:38:58 +00:00
|
|
|
@data_source_formula = args[:data_source_formula] if args.key?(:data_source_formula)
|
|
|
|
@data_source_table = args[:data_source_table] if args.key?(:data_source_table)
|
2017-08-25 19:54:22 +00:00
|
|
|
@data_validation = args[:data_validation] if args.key?(:data_validation)
|
|
|
|
@effective_format = args[:effective_format] if args.key?(:effective_format)
|
|
|
|
@effective_value = args[:effective_value] if args.key?(:effective_value)
|
|
|
|
@formatted_value = args[:formatted_value] if args.key?(:formatted_value)
|
|
|
|
@hyperlink = args[:hyperlink] if args.key?(:hyperlink)
|
|
|
|
@note = args[:note] if args.key?(:note)
|
|
|
|
@pivot_table = args[:pivot_table] if args.key?(:pivot_table)
|
|
|
|
@text_format_runs = args[:text_format_runs] if args.key?(:text_format_runs)
|
|
|
|
@user_entered_format = args[:user_entered_format] if args.key?(:user_entered_format)
|
|
|
|
@user_entered_value = args[:user_entered_value] if args.key?(:user_entered_value)
|
2017-06-02 06:11:31 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The format of a cell.
|
|
|
|
class CellFormat
|
2017-03-31 19:53:27 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2017-06-14 17:02:03 +00:00
|
|
|
# Represents a color in the RGBA color space. This representation is designed
|
|
|
|
# for simplicity of conversion to/from color representations in various
|
2020-08-18 00:38:22 +00:00
|
|
|
# languages over compactness; for example, the fields of this representation can
|
|
|
|
# be trivially provided to the constructor of "java.awt.Color" in Java; it can
|
|
|
|
# also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
|
|
|
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
|
|
|
# CSS "rgba()" string in JavaScript, as well. Note: this proto does not carry
|
|
|
|
# information about the absolute color space that should be used to interpret
|
|
|
|
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
|
|
|
# applications SHOULD assume the sRGB color space. Note: when color equality
|
|
|
|
# needs to be decided, implementations, unless documented otherwise, will treat
|
|
|
|
# two colors to be equal if all their red, green, blue and alpha values each
|
|
|
|
# differ by at most 1e-5. 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(''); `; // ...
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `backgroundColor`
|
2017-06-14 17:02:03 +00:00
|
|
|
# @return [Google::Apis::SheetsV4::Color]
|
2017-08-25 19:54:22 +00:00
|
|
|
attr_accessor :background_color
|
2017-05-26 16:44:32 +00:00
|
|
|
|
2020-02-05 00:37:38 +00:00
|
|
|
# A color value.
|
|
|
|
# Corresponds to the JSON property `backgroundColorStyle`
|
|
|
|
# @return [Google::Apis::SheetsV4::ColorStyle]
|
|
|
|
attr_accessor :background_color_style
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The borders of the cell.
|
|
|
|
# Corresponds to the JSON property `borders`
|
|
|
|
# @return [Google::Apis::SheetsV4::Borders]
|
|
|
|
attr_accessor :borders
|
2017-03-31 19:53:27 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The horizontal alignment of the value in the cell.
|
|
|
|
# Corresponds to the JSON property `horizontalAlignment`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :horizontal_alignment
|
2017-06-02 06:11:31 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# 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
|
2017-06-02 06:11:31 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The number format of a cell.
|
|
|
|
# Corresponds to the JSON property `numberFormat`
|
|
|
|
# @return [Google::Apis::SheetsV4::NumberFormat]
|
|
|
|
attr_accessor :number_format
|
2017-07-12 20:10:42 +00:00
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The amount of padding around the cell, in pixels. When updating padding, every
|
|
|
|
# field must be specified.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `padding`
|
|
|
|
# @return [Google::Apis::SheetsV4::Padding]
|
|
|
|
attr_accessor :padding
|
2017-06-02 06:11:31 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The direction of the text in the cell.
|
|
|
|
# Corresponds to the JSON property `textDirection`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :text_direction
|
2017-06-02 06:11:31 +00:00
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The format of a run of text in a cell. Absent values indicate that the field
|
|
|
|
# isn't specified.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `textFormat`
|
|
|
|
# @return [Google::Apis::SheetsV4::TextFormat]
|
|
|
|
attr_accessor :text_format
|
2017-03-30 22:30:51 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The rotation applied to text in a cell.
|
|
|
|
# Corresponds to the JSON property `textRotation`
|
|
|
|
# @return [Google::Apis::SheetsV4::TextRotation]
|
|
|
|
attr_accessor :text_rotation
|
2017-03-30 22:30:51 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The vertical alignment of the value in the cell.
|
|
|
|
# Corresponds to the JSON property `verticalAlignment`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :vertical_alignment
|
2017-07-12 20:10:42 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The wrap strategy for the value in the cell.
|
|
|
|
# Corresponds to the JSON property `wrapStrategy`
|
2017-07-12 20:10:42 +00:00
|
|
|
# @return [String]
|
2017-08-25 19:54:22 +00:00
|
|
|
attr_accessor :wrap_strategy
|
2017-05-26 16:44:32 +00:00
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@background_color = args[:background_color] if args.key?(:background_color)
|
2020-02-05 00:37:38 +00:00
|
|
|
@background_color_style = args[:background_color_style] if args.key?(:background_color_style)
|
2017-08-25 19:54:22 +00:00
|
|
|
@borders = args[:borders] if args.key?(:borders)
|
|
|
|
@horizontal_alignment = args[:horizontal_alignment] if args.key?(:horizontal_alignment)
|
|
|
|
@hyperlink_display_type = args[:hyperlink_display_type] if args.key?(:hyperlink_display_type)
|
|
|
|
@number_format = args[:number_format] if args.key?(:number_format)
|
|
|
|
@padding = args[:padding] if args.key?(:padding)
|
|
|
|
@text_direction = args[:text_direction] if args.key?(:text_direction)
|
|
|
|
@text_format = args[:text_format] if args.key?(:text_format)
|
|
|
|
@text_rotation = args[:text_rotation] if args.key?(:text_rotation)
|
|
|
|
@vertical_alignment = args[:vertical_alignment] if args.key?(:vertical_alignment)
|
|
|
|
@wrap_strategy = args[:wrap_strategy] if args.key?(:wrap_strategy)
|
2017-05-26 16:44:32 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2019-08-06 00:38:19 +00:00
|
|
|
# The options that define a "view window" for a chart (such as the visible
|
|
|
|
# values in an axis).
|
|
|
|
class ChartAxisViewWindowOptions
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
|
|
|
# The maximum numeric value to be shown in this view window. If unset, will
|
|
|
|
# automatically determine a maximum value that looks good for the data.
|
|
|
|
# Corresponds to the JSON property `viewWindowMax`
|
|
|
|
# @return [Float]
|
|
|
|
attr_accessor :view_window_max
|
|
|
|
|
|
|
|
# The minimum numeric value to be shown in this view window. If unset, will
|
|
|
|
# automatically determine a minimum value that looks good for the data.
|
|
|
|
# Corresponds to the JSON property `viewWindowMin`
|
|
|
|
# @return [Float]
|
|
|
|
attr_accessor :view_window_min
|
|
|
|
|
|
|
|
# The view window's mode.
|
|
|
|
# Corresponds to the JSON property `viewWindowMode`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :view_window_mode
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@view_window_max = args[:view_window_max] if args.key?(:view_window_max)
|
|
|
|
@view_window_min = args[:view_window_min] if args.key?(:view_window_min)
|
|
|
|
@view_window_mode = args[:view_window_mode] if args.key?(:view_window_mode)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2019-10-09 00:37:55 +00:00
|
|
|
# Custom number formatting options for chart attributes.
|
|
|
|
class ChartCustomNumberFormatOptions
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# Custom prefix to be prepended to the chart attribute. This field is optional.
|
2019-10-09 00:37:55 +00:00
|
|
|
# Corresponds to the JSON property `prefix`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :prefix
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# Custom suffix to be appended to the chart attribute. This field is optional.
|
2019-10-09 00:37:55 +00:00
|
|
|
# Corresponds to the JSON property `suffix`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :suffix
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@prefix = args[:prefix] if args.key?(:prefix)
|
|
|
|
@suffix = args[:suffix] if args.key?(:suffix)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The data included in a domain or series.
|
|
|
|
class ChartData
|
2017-05-26 16:44:32 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
2017-05-04 19:35:56 +00:00
|
|
|
|
2020-08-28 00:38:58 +00:00
|
|
|
# The aggregation type for the series of a data source chart. Not supported for
|
|
|
|
# regular charts.
|
|
|
|
# Corresponds to the JSON property `aggregateType`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :aggregate_type
|
|
|
|
|
2020-09-29 00:38:39 +00:00
|
|
|
# An unique identifier that references a data source column.
|
2020-08-28 00:38:58 +00:00
|
|
|
# Corresponds to the JSON property `columnReference`
|
|
|
|
# @return [Google::Apis::SheetsV4::DataSourceColumnReference]
|
|
|
|
attr_accessor :column_reference
|
|
|
|
|
|
|
|
# An optional setting on the ChartData of the domain of a data source chart that
|
|
|
|
# defines buckets for the values in the domain rather than breaking out each
|
|
|
|
# individual value. For example, when plotting a data source chart, you can
|
|
|
|
# specify a histogram rule on the domain (it should only contain numeric values),
|
|
|
|
# grouping its values into buckets. Any values of a chart series that fall into
|
|
|
|
# the same bucket are aggregated based on the aggregate_type.
|
|
|
|
# Corresponds to the JSON property `groupRule`
|
|
|
|
# @return [Google::Apis::SheetsV4::ChartGroupRule]
|
|
|
|
attr_accessor :group_rule
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Source ranges for a chart.
|
|
|
|
# Corresponds to the JSON property `sourceRange`
|
|
|
|
# @return [Google::Apis::SheetsV4::ChartSourceRange]
|
|
|
|
attr_accessor :source_range
|
2017-03-30 22:30:51 +00:00
|
|
|
|
2017-04-03 20:18:48 +00:00
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2020-08-28 00:38:58 +00:00
|
|
|
@aggregate_type = args[:aggregate_type] if args.key?(:aggregate_type)
|
|
|
|
@column_reference = args[:column_reference] if args.key?(:column_reference)
|
|
|
|
@group_rule = args[:group_rule] if args.key?(:group_rule)
|
2017-08-25 19:54:22 +00:00
|
|
|
@source_range = args[:source_range] if args.key?(:source_range)
|
2017-04-03 20:18:48 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2020-08-28 00:38:58 +00:00
|
|
|
# Allows you to organize the date-time values in a source data column into
|
|
|
|
# buckets based on selected parts of their date or time values.
|
|
|
|
class ChartDateTimeRule
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
|
|
|
# The type of date-time grouping to apply.
|
|
|
|
# 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)
|
|
|
|
@type = args[:type] if args.key?(:type)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
# An optional setting on the ChartData of the domain of a data source chart that
|
|
|
|
# defines buckets for the values in the domain rather than breaking out each
|
|
|
|
# individual value. For example, when plotting a data source chart, you can
|
|
|
|
# specify a histogram rule on the domain (it should only contain numeric values),
|
|
|
|
# grouping its values into buckets. Any values of a chart series that fall into
|
|
|
|
# the same bucket are aggregated based on the aggregate_type.
|
|
|
|
class ChartGroupRule
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
|
|
|
# Allows you to organize the date-time values in a source data column into
|
|
|
|
# buckets based on selected parts of their date or time values.
|
|
|
|
# Corresponds to the JSON property `dateTimeRule`
|
|
|
|
# @return [Google::Apis::SheetsV4::ChartDateTimeRule]
|
|
|
|
attr_accessor :date_time_rule
|
|
|
|
|
|
|
|
# Allows you to organize numeric values in a source data column into buckets of
|
|
|
|
# constant size.
|
|
|
|
# Corresponds to the JSON property `histogramRule`
|
|
|
|
# @return [Google::Apis::SheetsV4::ChartHistogramRule]
|
|
|
|
attr_accessor :histogram_rule
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@date_time_rule = args[:date_time_rule] if args.key?(:date_time_rule)
|
|
|
|
@histogram_rule = args[:histogram_rule] if args.key?(:histogram_rule)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
# Allows you to organize numeric values in a source data column into buckets of
|
|
|
|
# constant size.
|
|
|
|
class ChartHistogramRule
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
|
|
|
# The size of the buckets that are created. Must be positive.
|
|
|
|
# Corresponds to the JSON property `intervalSize`
|
|
|
|
# @return [Float]
|
|
|
|
attr_accessor :interval_size
|
|
|
|
|
|
|
|
# The maximum value at which items are placed into buckets. Values greater than
|
|
|
|
# the maximum are grouped into a single bucket. If omitted, it is determined by
|
|
|
|
# the maximum item value.
|
|
|
|
# Corresponds to the JSON property `maxValue`
|
|
|
|
# @return [Float]
|
|
|
|
attr_accessor :max_value
|
|
|
|
|
|
|
|
# The minimum value at which items are placed into buckets. Values that are less
|
|
|
|
# than the minimum are grouped into a single bucket. If omitted, it is
|
|
|
|
# determined by the minimum item value.
|
|
|
|
# Corresponds to the JSON property `minValue`
|
|
|
|
# @return [Float]
|
|
|
|
attr_accessor :min_value
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@interval_size = args[:interval_size] if args.key?(:interval_size)
|
|
|
|
@max_value = args[:max_value] if args.key?(:max_value)
|
|
|
|
@min_value = args[:min_value] if args.key?(:min_value)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Source ranges for a chart.
|
|
|
|
class ChartSourceRange
|
2017-04-03 20:18:48 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The ranges of data for a series or domain. Exactly one dimension must have a
|
|
|
|
# length of 1, and all sources in the list must have the same dimension with
|
|
|
|
# length 1. The domain (if it exists) & all series must have the same number of
|
|
|
|
# source ranges. If using more than one source range, then the source range at a
|
|
|
|
# given offset must be in order and contiguous across the domain and series. For
|
|
|
|
# example, these are valid configurations: domain sources: A1:A5 series1 sources:
|
|
|
|
# B1:B5 series2 sources: D6:D10 domain sources: A1:A5, C10:C12 series1 sources:
|
|
|
|
# B1:B5, D10:D12 series2 sources: C1:C5, E10:E12
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `sources`
|
|
|
|
# @return [Array<Google::Apis::SheetsV4::GridRange>]
|
|
|
|
attr_accessor :sources
|
2017-06-02 06:11:31 +00:00
|
|
|
|
2017-05-26 16:44:32 +00:00
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@sources = args[:sources] if args.key?(:sources)
|
2017-05-26 16:44:32 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The specifications of a chart.
|
|
|
|
class ChartSpec
|
2017-05-26 16:44:32 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The alternative text that describes the chart. This is often used for
|
|
|
|
# accessibility.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `altText`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :alt_text
|
2017-07-12 20:10:42 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Represents a color in the RGBA color space. This representation is designed
|
|
|
|
# for simplicity of conversion to/from color representations in various
|
2020-08-18 00:38:22 +00:00
|
|
|
# languages over compactness; for example, the fields of this representation can
|
|
|
|
# be trivially provided to the constructor of "java.awt.Color" in Java; it can
|
|
|
|
# also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
|
|
|
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
|
|
|
# CSS "rgba()" string in JavaScript, as well. Note: this proto does not carry
|
|
|
|
# information about the absolute color space that should be used to interpret
|
|
|
|
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
|
|
|
# applications SHOULD assume the sRGB color space. Note: when color equality
|
|
|
|
# needs to be decided, implementations, unless documented otherwise, will treat
|
|
|
|
# two colors to be equal if all their red, green, blue and alpha values each
|
|
|
|
# differ by at most 1e-5. 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(''); `; // ...
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `backgroundColor`
|
|
|
|
# @return [Google::Apis::SheetsV4::Color]
|
|
|
|
attr_accessor :background_color
|
2017-04-03 20:18:48 +00:00
|
|
|
|
2020-01-25 00:37:19 +00:00
|
|
|
# A color value.
|
|
|
|
# Corresponds to the JSON property `backgroundColorStyle`
|
|
|
|
# @return [Google::Apis::SheetsV4::ColorStyle]
|
|
|
|
attr_accessor :background_color_style
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The specification for a basic chart. See BasicChartType for the list of charts
|
|
|
|
# this supports.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `basicChart`
|
|
|
|
# @return [Google::Apis::SheetsV4::BasicChartSpec]
|
|
|
|
attr_accessor :basic_chart
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# A bubble chart.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `bubbleChart`
|
|
|
|
# @return [Google::Apis::SheetsV4::BubbleChartSpec]
|
|
|
|
attr_accessor :bubble_chart
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# A candlestick chart.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `candlestickChart`
|
|
|
|
# @return [Google::Apis::SheetsV4::CandlestickChartSpec]
|
|
|
|
attr_accessor :candlestick_chart
|
|
|
|
|
2020-08-28 00:38:58 +00:00
|
|
|
# Properties of a data source chart.
|
|
|
|
# Corresponds to the JSON property `dataSourceChartProperties`
|
|
|
|
# @return [Google::Apis::SheetsV4::DataSourceChartProperties]
|
|
|
|
attr_accessor :data_source_chart_properties
|
|
|
|
|
|
|
|
# The filters applied to the source data of the chart. Only supported for data
|
|
|
|
# source charts.
|
|
|
|
# Corresponds to the JSON property `filterSpecs`
|
|
|
|
# @return [Array<Google::Apis::SheetsV4::FilterSpec>]
|
|
|
|
attr_accessor :filter_specs
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The name of the font to use by default for all chart text (e.g. title, axis
|
|
|
|
# labels, legend). If a font is specified for a specific part of the chart it
|
|
|
|
# will override this font name.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `fontName`
|
2017-06-14 17:02:03 +00:00
|
|
|
# @return [String]
|
2017-08-25 19:54:22 +00:00
|
|
|
attr_accessor :font_name
|
2017-03-30 22:30:51 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Determines how the charts will use hidden rows or columns.
|
|
|
|
# Corresponds to the JSON property `hiddenDimensionStrategy`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :hidden_dimension_strategy
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# A histogram chart. A histogram chart groups data items into bins, displaying
|
|
|
|
# each bin as a column of stacked items. Histograms are used to display the
|
|
|
|
# distribution of a dataset. Each column of items represents a range into which
|
|
|
|
# those items fall. The number of bins can be chosen automatically or specified
|
2017-08-25 19:54:22 +00:00
|
|
|
# explicitly.
|
|
|
|
# Corresponds to the JSON property `histogramChart`
|
|
|
|
# @return [Google::Apis::SheetsV4::HistogramChartSpec]
|
|
|
|
attr_accessor :histogram_chart
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# True to make a chart fill the entire space in which it's rendered with minimum
|
|
|
|
# padding. False to use the default padding. (Not applicable to Geo and Org
|
|
|
|
# charts.)
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `maximized`
|
|
|
|
# @return [Boolean]
|
|
|
|
attr_accessor :maximized
|
|
|
|
alias_method :maximized?, :maximized
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# An org chart. Org charts require a unique set of labels in labels and may
|
|
|
|
# optionally include parent_labels and tooltips. parent_labels contain, for each
|
|
|
|
# node, the label identifying the parent node. tooltips contain, for each node,
|
|
|
|
# an optional tooltip. For example, to describe an OrgChart with Alice as the
|
|
|
|
# CEO, Bob as the President (reporting to Alice) and Cathy as VP of Sales (also
|
|
|
|
# reporting to Alice), have labels contain "Alice", "Bob", "Cathy",
|
|
|
|
# parent_labels contain "", "Alice", "Alice" and tooltips contain "CEO", "
|
|
|
|
# President", "VP Sales".
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `orgChart`
|
|
|
|
# @return [Google::Apis::SheetsV4::OrgChartSpec]
|
|
|
|
attr_accessor :org_chart
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# A pie chart.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `pieChart`
|
|
|
|
# @return [Google::Apis::SheetsV4::PieChartSpec]
|
|
|
|
attr_accessor :pie_chart
|
|
|
|
|
2019-10-09 00:37:55 +00:00
|
|
|
# A scorecard chart. Scorecard charts are used to highlight key performance
|
2020-08-18 00:38:22 +00:00
|
|
|
# indicators, known as KPIs, on the spreadsheet. A scorecard chart can represent
|
|
|
|
# things like total sales, average cost, or a top selling item. You can specify
|
|
|
|
# a single data value, or aggregate over a range of data. Percentage or absolute
|
|
|
|
# difference from a baseline value can be highlighted, like changes over time.
|
2019-10-09 00:37:55 +00:00
|
|
|
# Corresponds to the JSON property `scorecardChart`
|
|
|
|
# @return [Google::Apis::SheetsV4::ScorecardChartSpec]
|
|
|
|
attr_accessor :scorecard_chart
|
|
|
|
|
2020-08-28 00:38:58 +00:00
|
|
|
# The order to sort the chart data by. Only a single sort spec is supported.
|
|
|
|
# Only supported for data source charts.
|
|
|
|
# Corresponds to the JSON property `sortSpecs`
|
|
|
|
# @return [Array<Google::Apis::SheetsV4::SortSpec>]
|
|
|
|
attr_accessor :sort_specs
|
|
|
|
|
2017-10-03 00:35:28 +00:00
|
|
|
# The subtitle of the chart.
|
|
|
|
# Corresponds to the JSON property `subtitle`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :subtitle
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The format of a run of text in a cell. Absent values indicate that the field
|
|
|
|
# isn't specified.
|
2017-10-03 00:35:28 +00:00
|
|
|
# Corresponds to the JSON property `subtitleTextFormat`
|
|
|
|
# @return [Google::Apis::SheetsV4::TextFormat]
|
|
|
|
attr_accessor :subtitle_text_format
|
|
|
|
|
|
|
|
# Position settings for text.
|
|
|
|
# Corresponds to the JSON property `subtitleTextPosition`
|
|
|
|
# @return [Google::Apis::SheetsV4::TextPosition]
|
|
|
|
attr_accessor :subtitle_text_position
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The title of the chart.
|
|
|
|
# Corresponds to the JSON property `title`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :title
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The format of a run of text in a cell. Absent values indicate that the field
|
|
|
|
# isn't specified.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `titleTextFormat`
|
|
|
|
# @return [Google::Apis::SheetsV4::TextFormat]
|
|
|
|
attr_accessor :title_text_format
|
2017-06-02 06:11:31 +00:00
|
|
|
|
2017-10-03 00:35:28 +00:00
|
|
|
# Position settings for text.
|
|
|
|
# Corresponds to the JSON property `titleTextPosition`
|
|
|
|
# @return [Google::Apis::SheetsV4::TextPosition]
|
|
|
|
attr_accessor :title_text_position
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# A Treemap chart.
|
2018-03-13 00:36:07 +00:00
|
|
|
# Corresponds to the JSON property `treemapChart`
|
|
|
|
# @return [Google::Apis::SheetsV4::TreemapChartSpec]
|
|
|
|
attr_accessor :treemap_chart
|
|
|
|
|
2017-12-19 00:35:20 +00:00
|
|
|
# A waterfall chart.
|
|
|
|
# Corresponds to the JSON property `waterfallChart`
|
|
|
|
# @return [Google::Apis::SheetsV4::WaterfallChartSpec]
|
|
|
|
attr_accessor :waterfall_chart
|
|
|
|
|
2017-03-30 22:30:51 +00:00
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@alt_text = args[:alt_text] if args.key?(:alt_text)
|
|
|
|
@background_color = args[:background_color] if args.key?(:background_color)
|
2020-01-25 00:37:19 +00:00
|
|
|
@background_color_style = args[:background_color_style] if args.key?(:background_color_style)
|
2017-08-25 19:54:22 +00:00
|
|
|
@basic_chart = args[:basic_chart] if args.key?(:basic_chart)
|
|
|
|
@bubble_chart = args[:bubble_chart] if args.key?(:bubble_chart)
|
|
|
|
@candlestick_chart = args[:candlestick_chart] if args.key?(:candlestick_chart)
|
2020-08-28 00:38:58 +00:00
|
|
|
@data_source_chart_properties = args[:data_source_chart_properties] if args.key?(:data_source_chart_properties)
|
|
|
|
@filter_specs = args[:filter_specs] if args.key?(:filter_specs)
|
2017-08-25 19:54:22 +00:00
|
|
|
@font_name = args[:font_name] if args.key?(:font_name)
|
|
|
|
@hidden_dimension_strategy = args[:hidden_dimension_strategy] if args.key?(:hidden_dimension_strategy)
|
|
|
|
@histogram_chart = args[:histogram_chart] if args.key?(:histogram_chart)
|
|
|
|
@maximized = args[:maximized] if args.key?(:maximized)
|
|
|
|
@org_chart = args[:org_chart] if args.key?(:org_chart)
|
|
|
|
@pie_chart = args[:pie_chart] if args.key?(:pie_chart)
|
2019-10-09 00:37:55 +00:00
|
|
|
@scorecard_chart = args[:scorecard_chart] if args.key?(:scorecard_chart)
|
2020-08-28 00:38:58 +00:00
|
|
|
@sort_specs = args[:sort_specs] if args.key?(:sort_specs)
|
2017-10-03 00:35:28 +00:00
|
|
|
@subtitle = args[:subtitle] if args.key?(:subtitle)
|
|
|
|
@subtitle_text_format = args[:subtitle_text_format] if args.key?(:subtitle_text_format)
|
|
|
|
@subtitle_text_position = args[:subtitle_text_position] if args.key?(:subtitle_text_position)
|
2017-08-25 19:54:22 +00:00
|
|
|
@title = args[:title] if args.key?(:title)
|
|
|
|
@title_text_format = args[:title_text_format] if args.key?(:title_text_format)
|
2017-10-03 00:35:28 +00:00
|
|
|
@title_text_position = args[:title_text_position] if args.key?(:title_text_position)
|
2018-03-13 00:36:07 +00:00
|
|
|
@treemap_chart = args[:treemap_chart] if args.key?(:treemap_chart)
|
2017-12-19 00:35:20 +00:00
|
|
|
@waterfall_chart = args[:waterfall_chart] if args.key?(:waterfall_chart)
|
2017-03-30 22:30:51 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Clears the basic filter, if any exists on the sheet.
|
|
|
|
class ClearBasicFilterRequest
|
2017-03-30 22:30:51 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The sheet ID on which the basic filter should be cleared.
|
|
|
|
# Corresponds to the JSON property `sheetId`
|
|
|
|
# @return [Fixnum]
|
|
|
|
attr_accessor :sheet_id
|
2017-05-26 16:44:32 +00:00
|
|
|
|
2017-07-12 20:10:42 +00:00
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
2017-06-14 17:02:03 +00:00
|
|
|
|
2017-07-12 20:10:42 +00:00
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@sheet_id = args[:sheet_id] if args.key?(:sheet_id)
|
2017-07-12 20:10:42 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The request for clearing a range of values in a spreadsheet.
|
|
|
|
class ClearValuesRequest
|
2017-07-12 20:10:42 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The response when clearing a range of values in a spreadsheet.
|
|
|
|
class ClearValuesResponse
|
2017-07-12 20:10:42 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The range (in A1 notation) that was cleared. (If the request was for an
|
|
|
|
# unbounded range or a ranger larger than the bounds of the sheet, this will be
|
|
|
|
# the actual range that was cleared, bounded to the sheet's limits.)
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `clearedRange`
|
2017-05-26 16:44:32 +00:00
|
|
|
# @return [String]
|
2017-08-25 19:54:22 +00:00
|
|
|
attr_accessor :cleared_range
|
2017-06-14 17:02:03 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The spreadsheet the updates were applied to.
|
|
|
|
# Corresponds to the JSON property `spreadsheetId`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :spreadsheet_id
|
2017-05-26 16:44:32 +00:00
|
|
|
|
2017-04-03 20:18:48 +00:00
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@cleared_range = args[:cleared_range] if args.key?(:cleared_range)
|
|
|
|
@spreadsheet_id = args[:spreadsheet_id] if args.key?(:spreadsheet_id)
|
2017-04-03 20:18:48 +00:00
|
|
|
end
|
|
|
|
end
|
2017-03-30 22:30:51 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Represents a color in the RGBA color space. This representation is designed
|
|
|
|
# for simplicity of conversion to/from color representations in various
|
2020-08-18 00:38:22 +00:00
|
|
|
# languages over compactness; for example, the fields of this representation can
|
|
|
|
# be trivially provided to the constructor of "java.awt.Color" in Java; it can
|
|
|
|
# also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
|
|
|
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
|
|
|
# CSS "rgba()" string in JavaScript, as well. Note: this proto does not carry
|
|
|
|
# information about the absolute color space that should be used to interpret
|
|
|
|
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
|
|
|
# applications SHOULD assume the sRGB color space. Note: when color equality
|
|
|
|
# needs to be decided, implementations, unless documented otherwise, will treat
|
|
|
|
# two colors to be equal if all their red, green, blue and alpha values each
|
|
|
|
# differ by at most 1e-5. 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(''); `; // ...
|
2017-08-25 19:54:22 +00:00
|
|
|
class Color
|
2017-04-03 20:18:48 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
2017-03-30 22:30:51 +00:00
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# 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).
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `alpha`
|
|
|
|
# @return [Float]
|
|
|
|
attr_accessor :alpha
|
2017-06-14 17:02:03 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# 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
|
2017-06-14 17:02:03 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# 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 red in the color as a value in the interval [0, 1].
|
|
|
|
# Corresponds to the JSON property `red`
|
|
|
|
# @return [Float]
|
|
|
|
attr_accessor :red
|
2017-06-14 17:02:03 +00:00
|
|
|
|
2017-07-12 20:10:42 +00:00
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
2017-06-14 17:02:03 +00:00
|
|
|
|
2017-07-12 20:10:42 +00:00
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@alpha = args[:alpha] if args.key?(:alpha)
|
|
|
|
@blue = args[:blue] if args.key?(:blue)
|
|
|
|
@green = args[:green] if args.key?(:green)
|
|
|
|
@red = args[:red] if args.key?(:red)
|
2017-07-12 20:10:42 +00:00
|
|
|
end
|
|
|
|
end
|
2017-06-14 17:02:03 +00:00
|
|
|
|
2019-12-18 00:37:51 +00:00
|
|
|
# A color value.
|
|
|
|
class ColorStyle
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
|
|
|
# Represents a color in the RGBA color space. This representation is designed
|
|
|
|
# for simplicity of conversion to/from color representations in various
|
2020-08-18 00:38:22 +00:00
|
|
|
# languages over compactness; for example, the fields of this representation can
|
|
|
|
# be trivially provided to the constructor of "java.awt.Color" in Java; it can
|
|
|
|
# also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
|
|
|
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
|
|
|
# CSS "rgba()" string in JavaScript, as well. Note: this proto does not carry
|
|
|
|
# information about the absolute color space that should be used to interpret
|
|
|
|
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
|
|
|
# applications SHOULD assume the sRGB color space. Note: when color equality
|
|
|
|
# needs to be decided, implementations, unless documented otherwise, will treat
|
|
|
|
# two colors to be equal if all their red, green, blue and alpha values each
|
|
|
|
# differ by at most 1e-5. 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(''); `; // ...
|
2019-12-18 00:37:51 +00:00
|
|
|
# Corresponds to the JSON property `rgbColor`
|
|
|
|
# @return [Google::Apis::SheetsV4::Color]
|
|
|
|
attr_accessor :rgb_color
|
|
|
|
|
|
|
|
# Theme color.
|
|
|
|
# Corresponds to the JSON property `themeColor`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :theme_color
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@rgb_color = args[:rgb_color] if args.key?(:rgb_color)
|
|
|
|
@theme_color = args[:theme_color] if args.key?(:theme_color)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The value of the condition.
|
|
|
|
class ConditionValue
|
2017-07-12 20:10:42 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# 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.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `relativeDate`
|
2017-07-12 20:10:42 +00:00
|
|
|
# @return [String]
|
2017-08-25 19:54:22 +00:00
|
|
|
attr_accessor :relative_date
|
2017-07-12 20:10:42 +00:00
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# A value the condition is based on. The value is parsed as if the user typed
|
|
|
|
# into a cell. Formulas are supported (and must begin with an `=` or a '+').
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `userEnteredValue`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :user_entered_value
|
2017-03-30 22:30:51 +00:00
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@relative_date = args[:relative_date] if args.key?(:relative_date)
|
|
|
|
@user_entered_value = args[:user_entered_value] if args.key?(:user_entered_value)
|
2017-03-30 22:30:51 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# A rule describing a conditional format.
|
|
|
|
class ConditionalFormatRule
|
2017-03-31 19:53:27 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# A rule that may or may not match, depending on the condition.
|
|
|
|
# Corresponds to the JSON property `booleanRule`
|
|
|
|
# @return [Google::Apis::SheetsV4::BooleanRule]
|
|
|
|
attr_accessor :boolean_rule
|
2017-07-12 20:10:42 +00:00
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# 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.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `gradientRule`
|
|
|
|
# @return [Google::Apis::SheetsV4::GradientRule]
|
|
|
|
attr_accessor :gradient_rule
|
2017-07-12 20:10:42 +00:00
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The ranges that are formatted if the condition is true. All the ranges must be
|
|
|
|
# on the same grid.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `ranges`
|
|
|
|
# @return [Array<Google::Apis::SheetsV4::GridRange>]
|
|
|
|
attr_accessor :ranges
|
2017-07-12 20:10:42 +00:00
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@boolean_rule = args[:boolean_rule] if args.key?(:boolean_rule)
|
|
|
|
@gradient_rule = args[:gradient_rule] if args.key?(:gradient_rule)
|
|
|
|
@ranges = args[:ranges] if args.key?(:ranges)
|
2017-07-12 20:10:42 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Copies data from the source to the destination.
|
|
|
|
class CopyPasteRequest
|
2017-07-12 20:10:42 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# A range on a sheet. All indexes are zero-based. Indexes are half open, i.e.
|
|
|
|
# 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 sheet 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!`.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `destination`
|
2017-07-12 20:10:42 +00:00
|
|
|
# @return [Google::Apis::SheetsV4::GridRange]
|
2017-08-25 19:54:22 +00:00
|
|
|
attr_accessor :destination
|
2017-07-12 20:10:42 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# How that data should be oriented when pasting.
|
|
|
|
# Corresponds to the JSON property `pasteOrientation`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :paste_orientation
|
2017-07-12 20:10:42 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# What kind of data to paste.
|
|
|
|
# Corresponds to the JSON property `pasteType`
|
2017-07-12 20:10:42 +00:00
|
|
|
# @return [String]
|
2017-08-25 19:54:22 +00:00
|
|
|
attr_accessor :paste_type
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# A range on a sheet. All indexes are zero-based. Indexes are half open, i.e.
|
|
|
|
# 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 sheet 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!`.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `source`
|
|
|
|
# @return [Google::Apis::SheetsV4::GridRange]
|
|
|
|
attr_accessor :source
|
2017-07-12 20:10:42 +00:00
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@destination = args[:destination] if args.key?(:destination)
|
|
|
|
@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)
|
2017-07-12 20:10:42 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The request to copy a sheet across spreadsheets.
|
|
|
|
class CopySheetToAnotherSpreadsheetRequest
|
2017-07-12 20:10:42 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The ID of the spreadsheet to copy the sheet to.
|
|
|
|
# Corresponds to the JSON property `destinationSpreadsheetId`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :destination_spreadsheet_id
|
2017-07-12 20:10:42 +00:00
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@destination_spreadsheet_id = args[:destination_spreadsheet_id] if args.key?(:destination_spreadsheet_id)
|
2017-07-12 20:10:42 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-09-20 00:35:54 +00:00
|
|
|
# A request to create developer metadata.
|
|
|
|
class CreateDeveloperMetadataRequest
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
|
|
|
# Developer metadata associated with a location or object in a spreadsheet.
|
2020-08-18 00:38:22 +00:00
|
|
|
# Developer metadata may be used to associate arbitrary data with various parts
|
|
|
|
# of a spreadsheet and will remain associated at those locations as they move
|
|
|
|
# around and the spreadsheet is edited. For example, if developer metadata is
|
|
|
|
# associated with row 5 and another row is then subsequently inserted above row
|
|
|
|
# 5, that original metadata will still be associated with the row it was first
|
|
|
|
# associated with (what is now row 6). If the associated object is deleted its
|
|
|
|
# metadata is deleted too.
|
2017-09-20 00:35:54 +00:00
|
|
|
# Corresponds to the JSON property `developerMetadata`
|
|
|
|
# @return [Google::Apis::SheetsV4::DeveloperMetadata]
|
|
|
|
attr_accessor :developer_metadata
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@developer_metadata = args[:developer_metadata] if args.key?(:developer_metadata)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
# The response from creating developer metadata.
|
|
|
|
class CreateDeveloperMetadataResponse
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
|
|
|
# Developer metadata associated with a location or object in a spreadsheet.
|
2020-08-18 00:38:22 +00:00
|
|
|
# Developer metadata may be used to associate arbitrary data with various parts
|
|
|
|
# of a spreadsheet and will remain associated at those locations as they move
|
|
|
|
# around and the spreadsheet is edited. For example, if developer metadata is
|
|
|
|
# associated with row 5 and another row is then subsequently inserted above row
|
|
|
|
# 5, that original metadata will still be associated with the row it was first
|
|
|
|
# associated with (what is now row 6). If the associated object is deleted its
|
|
|
|
# metadata is deleted too.
|
2017-09-20 00:35:54 +00:00
|
|
|
# Corresponds to the JSON property `developerMetadata`
|
|
|
|
# @return [Google::Apis::SheetsV4::DeveloperMetadata]
|
|
|
|
attr_accessor :developer_metadata
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@developer_metadata = args[:developer_metadata] if args.key?(:developer_metadata)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Moves data from the source to the destination.
|
|
|
|
class CutPasteRequest
|
2017-07-12 20:10:42 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# A coordinate in a sheet. All indexes are zero-based.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `destination`
|
|
|
|
# @return [Google::Apis::SheetsV4::GridCoordinate]
|
|
|
|
attr_accessor :destination
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# What kind of data to paste. All the source data will be cut, regardless of
|
|
|
|
# what is pasted.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `pasteType`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :paste_type
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# A range on a sheet. All indexes are zero-based. Indexes are half open, i.e.
|
|
|
|
# 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 sheet 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!`.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `source`
|
|
|
|
# @return [Google::Apis::SheetsV4::GridRange]
|
|
|
|
attr_accessor :source
|
2017-07-12 20:10:42 +00:00
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@destination = args[:destination] if args.key?(:destination)
|
|
|
|
@paste_type = args[:paste_type] if args.key?(:paste_type)
|
|
|
|
@source = args[:source] if args.key?(:source)
|
2017-07-12 20:10:42 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2020-09-29 00:38:39 +00:00
|
|
|
# The data execution status. A data execution is created to sync a data source
|
|
|
|
# object with the latest data from a DataSource. It is usually scheduled to run
|
|
|
|
# at background, you can check its state to tell if an execution completes There
|
|
|
|
# are several scenarios where a data execution is triggered to run: * Adding a
|
|
|
|
# data source creates an associated data source sheet as well as a data
|
|
|
|
# execution to sync the data from the data source to the sheet. * Updating a
|
|
|
|
# data source creates a data execution to refresh the associated data source
|
|
|
|
# sheet similarly. * You can send refresh request to explicitly refresh one or
|
|
|
|
# multiple data source objects.
|
2020-08-28 00:38:58 +00:00
|
|
|
class DataExecutionStatus
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
|
|
|
# The error code.
|
|
|
|
# Corresponds to the JSON property `errorCode`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :error_code
|
|
|
|
|
|
|
|
# The error message, which may be empty.
|
|
|
|
# Corresponds to the JSON property `errorMessage`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :error_message
|
|
|
|
|
|
|
|
# Gets the time the data last successfully refreshed.
|
|
|
|
# Corresponds to the JSON property `lastRefreshTime`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :last_refresh_time
|
|
|
|
|
|
|
|
# The state of the data execution.
|
|
|
|
# Corresponds to the JSON property `state`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :state
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@error_code = args[:error_code] if args.key?(:error_code)
|
|
|
|
@error_message = args[:error_message] if args.key?(:error_message)
|
|
|
|
@last_refresh_time = args[:last_refresh_time] if args.key?(:last_refresh_time)
|
|
|
|
@state = args[:state] if args.key?(:state)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# Filter that describes what data should be selected or returned from a request.
|
2017-09-20 00:35:54 +00:00
|
|
|
class DataFilter
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
|
|
|
# Selects data that matches the specified A1 range.
|
|
|
|
# Corresponds to the JSON property `a1Range`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :a1_range
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# Selects DeveloperMetadata that matches all of the specified fields. For
|
2017-10-03 00:35:28 +00:00
|
|
|
# example, if only a metadata ID is specified this considers the
|
2017-09-20 00:35:54 +00:00
|
|
|
# DeveloperMetadata with that particular unique ID. If a metadata key is
|
2020-08-18 00:38:22 +00:00
|
|
|
# specified, this considers all developer metadata with that key. If a key,
|
|
|
|
# visibility, and location type are all specified, this considers all developer
|
|
|
|
# metadata with that key and visibility that are associated with a location of
|
|
|
|
# that type. In general, this selects all DeveloperMetadata that matches the
|
|
|
|
# intersection of all the specified fields; any field or combination of fields
|
|
|
|
# may be specified.
|
2017-09-20 00:35:54 +00:00
|
|
|
# Corresponds to the JSON property `developerMetadataLookup`
|
|
|
|
# @return [Google::Apis::SheetsV4::DeveloperMetadataLookup]
|
|
|
|
attr_accessor :developer_metadata_lookup
|
|
|
|
|
2020-08-28 00:38:58 +00:00
|
|
|
# A range on a sheet. All indexes are zero-based. Indexes are half open, i.e.
|
|
|
|
# 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 sheet 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 `gridRange`
|
|
|
|
# @return [Google::Apis::SheetsV4::GridRange]
|
|
|
|
attr_accessor :grid_range
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@a1_range = args[:a1_range] if args.key?(:a1_range)
|
|
|
|
@developer_metadata_lookup = args[:developer_metadata_lookup] if args.key?(:developer_metadata_lookup)
|
|
|
|
@grid_range = args[:grid_range] if args.key?(:grid_range)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
# A range of values whose location is specified by a DataFilter.
|
|
|
|
class DataFilterValueRange
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
|
|
|
# Filter that describes what data should be selected or returned from a request.
|
|
|
|
# Corresponds to the JSON property `dataFilter`
|
|
|
|
# @return [Google::Apis::SheetsV4::DataFilter]
|
|
|
|
attr_accessor :data_filter
|
|
|
|
|
|
|
|
# The major dimension of the values.
|
|
|
|
# Corresponds to the JSON property `majorDimension`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :major_dimension
|
|
|
|
|
|
|
|
# The data to be written. If the provided values exceed any of the ranges
|
|
|
|
# matched by the data filter then the request fails. If the provided values are
|
|
|
|
# less than the matched ranges only the specified values are written, existing
|
|
|
|
# values in the matched ranges remain unaffected.
|
|
|
|
# Corresponds to the JSON property `values`
|
|
|
|
# @return [Array<Array<Object>>]
|
|
|
|
attr_accessor :values
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@data_filter = args[:data_filter] if args.key?(:data_filter)
|
|
|
|
@major_dimension = args[:major_dimension] if args.key?(:major_dimension)
|
|
|
|
@values = args[:values] if args.key?(:values)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
# Information about an external data source in the spreadsheet.
|
|
|
|
class DataSource
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
|
|
|
# All calculated columns in the data source.
|
|
|
|
# Corresponds to the JSON property `calculatedColumns`
|
|
|
|
# @return [Array<Google::Apis::SheetsV4::DataSourceColumn>]
|
|
|
|
attr_accessor :calculated_columns
|
|
|
|
|
2020-09-29 00:38:39 +00:00
|
|
|
# The spreadsheet-scoped unique ID that identifies the data source. Example:
|
|
|
|
# 1080547365.
|
2020-08-28 00:38:58 +00:00
|
|
|
# Corresponds to the JSON property `dataSourceId`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :data_source_id
|
|
|
|
|
|
|
|
# The ID of the Sheet connected with the data source. The field cannot be
|
2020-09-29 00:38:39 +00:00
|
|
|
# changed once set. When creating a data source, an associated DATA_SOURCE sheet
|
|
|
|
# is also created, if the field is not specified, the ID of the created sheet
|
|
|
|
# will be randomly generated.
|
2020-08-28 00:38:58 +00:00
|
|
|
# Corresponds to the JSON property `sheetId`
|
|
|
|
# @return [Fixnum]
|
|
|
|
attr_accessor :sheet_id
|
|
|
|
|
2020-09-29 00:38:39 +00:00
|
|
|
# This specifies the details of the data source. For example, for BigQuery, this
|
|
|
|
# specifies information about the BigQuery source.
|
2020-08-28 00:38:58 +00:00
|
|
|
# Corresponds to the JSON property `spec`
|
|
|
|
# @return [Google::Apis::SheetsV4::DataSourceSpec]
|
|
|
|
attr_accessor :spec
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@calculated_columns = args[:calculated_columns] if args.key?(:calculated_columns)
|
|
|
|
@data_source_id = args[:data_source_id] if args.key?(:data_source_id)
|
|
|
|
@sheet_id = args[:sheet_id] if args.key?(:sheet_id)
|
|
|
|
@spec = args[:spec] if args.key?(:spec)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
# Properties of a data source chart.
|
|
|
|
class DataSourceChartProperties
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2020-09-29 00:38:39 +00:00
|
|
|
# The data execution status. A data execution is created to sync a data source
|
|
|
|
# object with the latest data from a DataSource. It is usually scheduled to run
|
|
|
|
# at background, you can check its state to tell if an execution completes There
|
|
|
|
# are several scenarios where a data execution is triggered to run: * Adding a
|
|
|
|
# data source creates an associated data source sheet as well as a data
|
|
|
|
# execution to sync the data from the data source to the sheet. * Updating a
|
|
|
|
# data source creates a data execution to refresh the associated data source
|
|
|
|
# sheet similarly. * You can send refresh request to explicitly refresh one or
|
|
|
|
# multiple data source objects.
|
2020-08-28 00:38:58 +00:00
|
|
|
# Corresponds to the JSON property `dataExecutionStatus`
|
|
|
|
# @return [Google::Apis::SheetsV4::DataExecutionStatus]
|
|
|
|
attr_accessor :data_execution_status
|
|
|
|
|
|
|
|
# ID of the data source that the chart is associated with.
|
|
|
|
# Corresponds to the JSON property `dataSourceId`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :data_source_id
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@data_execution_status = args[:data_execution_status] if args.key?(:data_execution_status)
|
|
|
|
@data_source_id = args[:data_source_id] if args.key?(:data_source_id)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2020-09-29 00:38:39 +00:00
|
|
|
# A column in a data source.
|
2020-08-28 00:38:58 +00:00
|
|
|
class DataSourceColumn
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
|
|
|
# The formula of the calculated column.
|
|
|
|
# Corresponds to the JSON property `formula`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :formula
|
|
|
|
|
2020-09-29 00:38:39 +00:00
|
|
|
# An unique identifier that references a data source column.
|
2020-08-28 00:38:58 +00:00
|
|
|
# Corresponds to the JSON property `reference`
|
|
|
|
# @return [Google::Apis::SheetsV4::DataSourceColumnReference]
|
|
|
|
attr_accessor :reference
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@formula = args[:formula] if args.key?(:formula)
|
|
|
|
@reference = args[:reference] if args.key?(:reference)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2020-09-29 00:38:39 +00:00
|
|
|
# An unique identifier that references a data source column.
|
2020-08-28 00:38:58 +00:00
|
|
|
class DataSourceColumnReference
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
|
|
|
# The display name of the column. It should be unique within a data source.
|
|
|
|
# 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)
|
|
|
|
@name = args[:name] if args.key?(:name)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
# A data source formula.
|
|
|
|
class DataSourceFormula
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2020-09-29 00:38:39 +00:00
|
|
|
# The data execution status. A data execution is created to sync a data source
|
|
|
|
# object with the latest data from a DataSource. It is usually scheduled to run
|
|
|
|
# at background, you can check its state to tell if an execution completes There
|
|
|
|
# are several scenarios where a data execution is triggered to run: * Adding a
|
|
|
|
# data source creates an associated data source sheet as well as a data
|
|
|
|
# execution to sync the data from the data source to the sheet. * Updating a
|
|
|
|
# data source creates a data execution to refresh the associated data source
|
|
|
|
# sheet similarly. * You can send refresh request to explicitly refresh one or
|
|
|
|
# multiple data source objects.
|
2020-08-28 00:38:58 +00:00
|
|
|
# Corresponds to the JSON property `dataExecutionStatus`
|
|
|
|
# @return [Google::Apis::SheetsV4::DataExecutionStatus]
|
|
|
|
attr_accessor :data_execution_status
|
|
|
|
|
|
|
|
# The ID of the data source the formula is associated with.
|
|
|
|
# Corresponds to the JSON property `dataSourceId`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :data_source_id
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@data_execution_status = args[:data_execution_status] if args.key?(:data_execution_status)
|
|
|
|
@data_source_id = args[:data_source_id] if args.key?(:data_source_id)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
# Reference to a data source object.
|
|
|
|
class DataSourceObjectReference
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2020-09-29 00:38:39 +00:00
|
|
|
# References to a data source chart.
|
2020-08-28 00:38:58 +00:00
|
|
|
# Corresponds to the JSON property `chartId`
|
|
|
|
# @return [Fixnum]
|
|
|
|
attr_accessor :chart_id
|
|
|
|
|
|
|
|
# A coordinate in a sheet. All indexes are zero-based.
|
|
|
|
# Corresponds to the JSON property `dataSourceFormulaCell`
|
|
|
|
# @return [Google::Apis::SheetsV4::GridCoordinate]
|
|
|
|
attr_accessor :data_source_formula_cell
|
|
|
|
|
|
|
|
# A coordinate in a sheet. All indexes are zero-based.
|
|
|
|
# Corresponds to the JSON property `dataSourcePivotTableAnchorCell`
|
|
|
|
# @return [Google::Apis::SheetsV4::GridCoordinate]
|
|
|
|
attr_accessor :data_source_pivot_table_anchor_cell
|
|
|
|
|
|
|
|
# A coordinate in a sheet. All indexes are zero-based.
|
|
|
|
# Corresponds to the JSON property `dataSourceTableAnchorCell`
|
|
|
|
# @return [Google::Apis::SheetsV4::GridCoordinate]
|
|
|
|
attr_accessor :data_source_table_anchor_cell
|
|
|
|
|
2020-09-29 00:38:39 +00:00
|
|
|
# References to a DATA_SOURCE sheet.
|
2020-08-28 00:38:58 +00:00
|
|
|
# Corresponds to the JSON property `sheetId`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :sheet_id
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@chart_id = args[:chart_id] if args.key?(:chart_id)
|
|
|
|
@data_source_formula_cell = args[:data_source_formula_cell] if args.key?(:data_source_formula_cell)
|
|
|
|
@data_source_pivot_table_anchor_cell = args[:data_source_pivot_table_anchor_cell] if args.key?(:data_source_pivot_table_anchor_cell)
|
|
|
|
@data_source_table_anchor_cell = args[:data_source_table_anchor_cell] if args.key?(:data_source_table_anchor_cell)
|
|
|
|
@sheet_id = args[:sheet_id] if args.key?(:sheet_id)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
# A list of references to data source objects.
|
|
|
|
class DataSourceObjectReferences
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
|
|
|
# The references.
|
|
|
|
# Corresponds to the JSON property `references`
|
|
|
|
# @return [Array<Google::Apis::SheetsV4::DataSourceObjectReference>]
|
|
|
|
attr_accessor :references
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@references = args[:references] if args.key?(:references)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2020-09-29 00:38:39 +00:00
|
|
|
# A parameter in a data source's query. The parameter allows the user to pass in
|
2020-08-28 00:38:58 +00:00
|
|
|
# values from the spreadsheet into a query.
|
|
|
|
class DataSourceParameter
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
|
|
|
# Named parameter. Must be a legitimate identifier for the DataSource that
|
2020-09-29 00:38:39 +00:00
|
|
|
# supports it. For example, [BigQuery identifier](https://cloud.google.com/
|
|
|
|
# bigquery/docs/reference/standard-sql/lexical#identifiers).
|
2020-08-28 00:38:58 +00:00
|
|
|
# Corresponds to the JSON property `name`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :name
|
|
|
|
|
|
|
|
# ID of a NamedRange. Its size must be 1x1.
|
|
|
|
# Corresponds to the JSON property `namedRangeId`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :named_range_id
|
|
|
|
|
|
|
|
# A range on a sheet. All indexes are zero-based. Indexes are half open, i.e.
|
|
|
|
# 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 sheet 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::SheetsV4::GridRange]
|
|
|
|
attr_accessor :range
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@name = args[:name] if args.key?(:name)
|
|
|
|
@named_range_id = args[:named_range_id] if args.key?(:named_range_id)
|
|
|
|
@range = args[:range] if args.key?(:range)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2020-09-29 00:38:39 +00:00
|
|
|
# A schedule for data to refresh every day in a given time interval.
|
2020-08-28 00:38:58 +00:00
|
|
|
class DataSourceRefreshDailySchedule
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
|
|
|
# Represents a time of day. The date and time zone are either not significant or
|
|
|
|
# are specified elsewhere. An API may choose to allow leap seconds. Related
|
|
|
|
# types are google.type.Date and `google.protobuf.Timestamp`.
|
|
|
|
# Corresponds to the JSON property `startTime`
|
|
|
|
# @return [Google::Apis::SheetsV4::TimeOfDay]
|
|
|
|
attr_accessor :start_time
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@start_time = args[:start_time] if args.key?(:start_time)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2020-09-29 00:38:39 +00:00
|
|
|
# A monthly schedule for data to refresh on specific days in the month in a
|
|
|
|
# given time interval.
|
2020-08-28 00:38:58 +00:00
|
|
|
class DataSourceRefreshMonthlySchedule
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
|
|
|
# Days of the month to refresh. Only 1-28 are supported, mapping to the 1st to
|
|
|
|
# the 28th day. At lesat one day must be specified.
|
|
|
|
# Corresponds to the JSON property `daysOfMonth`
|
|
|
|
# @return [Array<Fixnum>]
|
|
|
|
attr_accessor :days_of_month
|
|
|
|
|
|
|
|
# Represents a time of day. The date and time zone are either not significant or
|
|
|
|
# are specified elsewhere. An API may choose to allow leap seconds. Related
|
|
|
|
# types are google.type.Date and `google.protobuf.Timestamp`.
|
|
|
|
# Corresponds to the JSON property `startTime`
|
|
|
|
# @return [Google::Apis::SheetsV4::TimeOfDay]
|
|
|
|
attr_accessor :start_time
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@days_of_month = args[:days_of_month] if args.key?(:days_of_month)
|
|
|
|
@start_time = args[:start_time] if args.key?(:start_time)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2020-09-29 00:38:39 +00:00
|
|
|
# Schedule for refreshing the data source. Data sources in the spreadsheet are
|
|
|
|
# refreshed within a time interval. You can specify the start time by clicking
|
|
|
|
# the Scheduled Refresh button in the Sheets editor, but the interval is fixed
|
|
|
|
# at 4 hours. For example, if you specify a start time of 8am , the refresh will
|
|
|
|
# take place between 8am and 12pm every day.
|
2020-08-28 00:38:58 +00:00
|
|
|
class DataSourceRefreshSchedule
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2020-09-29 00:38:39 +00:00
|
|
|
# A schedule for data to refresh every day in a given time interval.
|
2020-08-28 00:38:58 +00:00
|
|
|
# Corresponds to the JSON property `dailySchedule`
|
|
|
|
# @return [Google::Apis::SheetsV4::DataSourceRefreshDailySchedule]
|
|
|
|
attr_accessor :daily_schedule
|
|
|
|
|
|
|
|
# True if the refresh schedule is enabled, or false otherwise.
|
|
|
|
# Corresponds to the JSON property `enabled`
|
|
|
|
# @return [Boolean]
|
|
|
|
attr_accessor :enabled
|
|
|
|
alias_method :enabled?, :enabled
|
|
|
|
|
2020-09-29 00:38:39 +00:00
|
|
|
# A monthly schedule for data to refresh on specific days in the month in a
|
|
|
|
# given time interval.
|
2020-08-28 00:38:58 +00:00
|
|
|
# Corresponds to the JSON property `monthlySchedule`
|
|
|
|
# @return [Google::Apis::SheetsV4::DataSourceRefreshMonthlySchedule]
|
|
|
|
attr_accessor :monthly_schedule
|
|
|
|
|
|
|
|
# Represents a time interval, encoded as a Timestamp start (inclusive) and a
|
|
|
|
# Timestamp end (exclusive). The start must be less than or equal to the end.
|
|
|
|
# When the start equals the end, the interval is empty (matches no time). When
|
|
|
|
# both start and end are unspecified, the interval matches any time.
|
|
|
|
# Corresponds to the JSON property `nextRun`
|
|
|
|
# @return [Google::Apis::SheetsV4::Interval]
|
|
|
|
attr_accessor :next_run
|
|
|
|
|
2020-09-29 00:38:39 +00:00
|
|
|
# The scope of the refresh. Must be ALL_DATA_SOURCES.
|
2020-08-28 00:38:58 +00:00
|
|
|
# Corresponds to the JSON property `refreshScope`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :refresh_scope
|
|
|
|
|
2020-09-29 00:38:39 +00:00
|
|
|
# A weekly schedule for data to refresh on specific days in a given time
|
|
|
|
# interval.
|
2020-08-28 00:38:58 +00:00
|
|
|
# Corresponds to the JSON property `weeklySchedule`
|
|
|
|
# @return [Google::Apis::SheetsV4::DataSourceRefreshWeeklySchedule]
|
|
|
|
attr_accessor :weekly_schedule
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@daily_schedule = args[:daily_schedule] if args.key?(:daily_schedule)
|
|
|
|
@enabled = args[:enabled] if args.key?(:enabled)
|
|
|
|
@monthly_schedule = args[:monthly_schedule] if args.key?(:monthly_schedule)
|
|
|
|
@next_run = args[:next_run] if args.key?(:next_run)
|
|
|
|
@refresh_scope = args[:refresh_scope] if args.key?(:refresh_scope)
|
|
|
|
@weekly_schedule = args[:weekly_schedule] if args.key?(:weekly_schedule)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2020-09-29 00:38:39 +00:00
|
|
|
# A weekly schedule for data to refresh on specific days in a given time
|
|
|
|
# interval.
|
2020-08-28 00:38:58 +00:00
|
|
|
class DataSourceRefreshWeeklySchedule
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
|
|
|
# Days of the week to refresh. At least one day must be specified.
|
|
|
|
# Corresponds to the JSON property `daysOfWeek`
|
|
|
|
# @return [Array<String>]
|
|
|
|
attr_accessor :days_of_week
|
|
|
|
|
|
|
|
# Represents a time of day. The date and time zone are either not significant or
|
|
|
|
# are specified elsewhere. An API may choose to allow leap seconds. Related
|
|
|
|
# types are google.type.Date and `google.protobuf.Timestamp`.
|
|
|
|
# Corresponds to the JSON property `startTime`
|
|
|
|
# @return [Google::Apis::SheetsV4::TimeOfDay]
|
|
|
|
attr_accessor :start_time
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@days_of_week = args[:days_of_week] if args.key?(:days_of_week)
|
|
|
|
@start_time = args[:start_time] if args.key?(:start_time)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2020-09-29 00:38:39 +00:00
|
|
|
# A range along a single dimension on a DATA_SOURCE sheet.
|
2020-08-28 00:38:58 +00:00
|
|
|
class DataSourceSheetDimensionRange
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
|
|
|
# The columns on the data source sheet.
|
|
|
|
# Corresponds to the JSON property `columnReferences`
|
|
|
|
# @return [Array<Google::Apis::SheetsV4::DataSourceColumnReference>]
|
|
|
|
attr_accessor :column_references
|
|
|
|
|
|
|
|
# The ID of the data source sheet the range is on.
|
|
|
|
# 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)
|
|
|
|
@column_references = args[:column_references] if args.key?(:column_references)
|
|
|
|
@sheet_id = args[:sheet_id] if args.key?(:sheet_id)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2020-09-29 00:38:39 +00:00
|
|
|
# Additional properties of a DATA_SOURCE sheet.
|
2020-08-28 00:38:58 +00:00
|
|
|
class DataSourceSheetProperties
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
|
|
|
# The columns displayed on the sheet, corresponding to the values in RowData.
|
|
|
|
# Corresponds to the JSON property `columns`
|
|
|
|
# @return [Array<Google::Apis::SheetsV4::DataSourceColumn>]
|
|
|
|
attr_accessor :columns
|
|
|
|
|
2020-09-29 00:38:39 +00:00
|
|
|
# The data execution status. A data execution is created to sync a data source
|
|
|
|
# object with the latest data from a DataSource. It is usually scheduled to run
|
|
|
|
# at background, you can check its state to tell if an execution completes There
|
|
|
|
# are several scenarios where a data execution is triggered to run: * Adding a
|
|
|
|
# data source creates an associated data source sheet as well as a data
|
|
|
|
# execution to sync the data from the data source to the sheet. * Updating a
|
|
|
|
# data source creates a data execution to refresh the associated data source
|
|
|
|
# sheet similarly. * You can send refresh request to explicitly refresh one or
|
|
|
|
# multiple data source objects.
|
2020-08-28 00:38:58 +00:00
|
|
|
# Corresponds to the JSON property `dataExecutionStatus`
|
|
|
|
# @return [Google::Apis::SheetsV4::DataExecutionStatus]
|
|
|
|
attr_accessor :data_execution_status
|
|
|
|
|
2020-09-29 00:38:39 +00:00
|
|
|
# ID of the DataSource the sheet is connected to.
|
2020-08-28 00:38:58 +00:00
|
|
|
# Corresponds to the JSON property `dataSourceId`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :data_source_id
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@columns = args[:columns] if args.key?(:columns)
|
|
|
|
@data_execution_status = args[:data_execution_status] if args.key?(:data_execution_status)
|
|
|
|
@data_source_id = args[:data_source_id] if args.key?(:data_source_id)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2020-09-29 00:38:39 +00:00
|
|
|
# This specifies the details of the data source. For example, for BigQuery, this
|
|
|
|
# specifies information about the BigQuery source.
|
2020-08-28 00:38:58 +00:00
|
|
|
class DataSourceSpec
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2020-09-29 00:38:39 +00:00
|
|
|
# The specification of a BigQuery data source that's connected to a sheet.
|
2020-08-28 00:38:58 +00:00
|
|
|
# Corresponds to the JSON property `bigQuery`
|
|
|
|
# @return [Google::Apis::SheetsV4::BigQueryDataSourceSpec]
|
|
|
|
attr_accessor :big_query
|
|
|
|
|
2020-09-29 00:38:39 +00:00
|
|
|
# The parameters of the data source, used when querying the data source.
|
2020-08-28 00:38:58 +00:00
|
|
|
# Corresponds to the JSON property `parameters`
|
|
|
|
# @return [Array<Google::Apis::SheetsV4::DataSourceParameter>]
|
|
|
|
attr_accessor :parameters
|
2017-09-20 00:35:54 +00:00
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2020-08-28 00:38:58 +00:00
|
|
|
@big_query = args[:big_query] if args.key?(:big_query)
|
|
|
|
@parameters = args[:parameters] if args.key?(:parameters)
|
2017-09-20 00:35:54 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2020-09-29 00:38:39 +00:00
|
|
|
# A data source table, which allows the user to import a static table of data
|
|
|
|
# from the DataSource into Sheets. This is also known as "Extract" in the Sheets
|
|
|
|
# editor.
|
2020-08-28 00:38:58 +00:00
|
|
|
class DataSourceTable
|
2017-09-20 00:35:54 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2020-08-28 00:38:58 +00:00
|
|
|
# The type to select columns for the data source table. Defaults to SELECTED.
|
|
|
|
# Corresponds to the JSON property `columnSelectionType`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :column_selection_type
|
2017-09-20 00:35:54 +00:00
|
|
|
|
2020-08-28 00:38:58 +00:00
|
|
|
# Columns selected for the data source table. The column_selection_type must be
|
|
|
|
# SELECTED.
|
|
|
|
# Corresponds to the JSON property `columns`
|
|
|
|
# @return [Array<Google::Apis::SheetsV4::DataSourceColumnReference>]
|
|
|
|
attr_accessor :columns
|
|
|
|
|
2020-09-29 00:38:39 +00:00
|
|
|
# The data execution status. A data execution is created to sync a data source
|
|
|
|
# object with the latest data from a DataSource. It is usually scheduled to run
|
|
|
|
# at background, you can check its state to tell if an execution completes There
|
|
|
|
# are several scenarios where a data execution is triggered to run: * Adding a
|
|
|
|
# data source creates an associated data source sheet as well as a data
|
|
|
|
# execution to sync the data from the data source to the sheet. * Updating a
|
|
|
|
# data source creates a data execution to refresh the associated data source
|
|
|
|
# sheet similarly. * You can send refresh request to explicitly refresh one or
|
|
|
|
# multiple data source objects.
|
2020-08-28 00:38:58 +00:00
|
|
|
# Corresponds to the JSON property `dataExecutionStatus`
|
|
|
|
# @return [Google::Apis::SheetsV4::DataExecutionStatus]
|
|
|
|
attr_accessor :data_execution_status
|
|
|
|
|
|
|
|
# The ID of the data source the data source table is associated with.
|
|
|
|
# Corresponds to the JSON property `dataSourceId`
|
2017-09-20 00:35:54 +00:00
|
|
|
# @return [String]
|
2020-08-28 00:38:58 +00:00
|
|
|
attr_accessor :data_source_id
|
2017-09-20 00:35:54 +00:00
|
|
|
|
2020-08-28 00:38:58 +00:00
|
|
|
# Filter specifications in the data source table.
|
|
|
|
# Corresponds to the JSON property `filterSpecs`
|
|
|
|
# @return [Array<Google::Apis::SheetsV4::FilterSpec>]
|
|
|
|
attr_accessor :filter_specs
|
|
|
|
|
|
|
|
# The limit of rows to return. If not set, a default limit is applied. Please
|
|
|
|
# refer to the Sheets editor for the default and max limit.
|
|
|
|
# Corresponds to the JSON property `rowLimit`
|
|
|
|
# @return [Fixnum]
|
|
|
|
attr_accessor :row_limit
|
|
|
|
|
|
|
|
# Sort specifications in the data source table. The result of the data source
|
|
|
|
# table is sorted based on the sort specifications in order.
|
|
|
|
# Corresponds to the JSON property `sortSpecs`
|
|
|
|
# @return [Array<Google::Apis::SheetsV4::SortSpec>]
|
|
|
|
attr_accessor :sort_specs
|
2017-09-20 00:35:54 +00:00
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2020-08-28 00:38:58 +00:00
|
|
|
@column_selection_type = args[:column_selection_type] if args.key?(:column_selection_type)
|
|
|
|
@columns = args[:columns] if args.key?(:columns)
|
|
|
|
@data_execution_status = args[:data_execution_status] if args.key?(:data_execution_status)
|
|
|
|
@data_source_id = args[:data_source_id] if args.key?(:data_source_id)
|
|
|
|
@filter_specs = args[:filter_specs] if args.key?(:filter_specs)
|
|
|
|
@row_limit = args[:row_limit] if args.key?(:row_limit)
|
|
|
|
@sort_specs = args[:sort_specs] if args.key?(:sort_specs)
|
2017-09-20 00:35:54 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# A data validation rule.
|
|
|
|
class DataValidationRule
|
2017-07-12 20:10:42 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# A condition that can evaluate to true or false. BooleanConditions are used by
|
|
|
|
# conditional formatting, data validation, and the criteria in filters.
|
2017-07-12 20:10:42 +00:00
|
|
|
# Corresponds to the JSON property `condition`
|
|
|
|
# @return [Google::Apis::SheetsV4::BooleanCondition]
|
|
|
|
attr_accessor :condition
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# A message to show the user when adding data to the cell.
|
|
|
|
# Corresponds to the JSON property `inputMessage`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :input_message
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# True if the UI should be customized based on the kind of condition. If true, "
|
|
|
|
# List" conditions will show a dropdown.
|
2017-08-25 19:54:22 +00:00
|
|
|
# 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
|
2017-07-12 20:10:42 +00:00
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@condition = args[:condition] if args.key?(:condition)
|
2017-08-25 19:54:22 +00:00
|
|
|
@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)
|
2017-07-12 20:10:42 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2018-05-08 00:35:49 +00:00
|
|
|
# Allows you to organize the date-time values in a source data column into
|
|
|
|
# buckets based on selected parts of their date or time values. For example,
|
2020-08-18 00:38:22 +00:00
|
|
|
# consider a pivot table showing sales transactions by date: +----------+--------
|
|
|
|
# ------+ | Date | SUM of Sales | +----------+--------------+ | 1/1/2017 | $621.
|
|
|
|
# 14 | | 2/3/2017 | $708.84 | | 5/8/2017 | $326.84 | ... +----------+------------
|
|
|
|
# --+ Applying a date-time group rule with a DateTimeRuleType of YEAR_MONTH
|
|
|
|
# results in the following pivot table. +--------------+--------------+ |
|
|
|
|
# Grouped Date | SUM of Sales | +--------------+--------------+ | 2017-Jan | $53,
|
|
|
|
# 731.78 | | 2017-Feb | $83,475.32 | | 2017-Mar | $94,385.05 | ... +-------------
|
|
|
|
# -+--------------+
|
2018-05-08 00:35:49 +00:00
|
|
|
class DateTimeRule
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
|
|
|
# The type of date-time grouping to apply.
|
|
|
|
# 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)
|
|
|
|
@type = args[:type] if args.key?(:type)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Removes the banded range with the given ID from the spreadsheet.
|
|
|
|
class DeleteBandingRequest
|
2017-07-12 20:10:42 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The ID of the banded range to delete.
|
|
|
|
# Corresponds to the JSON property `bandedRangeId`
|
|
|
|
# @return [Fixnum]
|
|
|
|
attr_accessor :banded_range_id
|
2017-07-12 20:10:42 +00:00
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@banded_range_id = args[:banded_range_id] if args.key?(:banded_range_id)
|
2017-07-12 20:10:42 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# Deletes a conditional format rule at the given index. All subsequent rules'
|
|
|
|
# indexes are decremented.
|
2017-08-25 19:54:22 +00:00
|
|
|
class DeleteConditionalFormatRuleRequest
|
2017-07-12 20:10:42 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The zero-based index of the rule to be deleted.
|
|
|
|
# Corresponds to the JSON property `index`
|
|
|
|
# @return [Fixnum]
|
|
|
|
attr_accessor :index
|
2017-07-12 20:10:42 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The sheet the rule is being deleted from.
|
|
|
|
# Corresponds to the JSON property `sheetId`
|
|
|
|
# @return [Fixnum]
|
|
|
|
attr_accessor :sheet_id
|
2017-07-12 20:10:42 +00:00
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@index = args[:index] if args.key?(:index)
|
|
|
|
@sheet_id = args[:sheet_id] if args.key?(:sheet_id)
|
2017-07-12 20:10:42 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The result of deleting a conditional format rule.
|
|
|
|
class DeleteConditionalFormatRuleResponse
|
2017-07-12 20:10:42 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# A rule describing a conditional format.
|
|
|
|
# Corresponds to the JSON property `rule`
|
|
|
|
# @return [Google::Apis::SheetsV4::ConditionalFormatRule]
|
|
|
|
attr_accessor :rule
|
2017-07-12 20:10:42 +00:00
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@rule = args[:rule] if args.key?(:rule)
|
2017-07-12 20:10:42 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2020-08-28 00:38:58 +00:00
|
|
|
# Deletes a data source. The request also deletes the associated data source
|
|
|
|
# sheet, and unlinks all associated data source objects.
|
|
|
|
class DeleteDataSourceRequest
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
|
|
|
# The ID of the data source to delete.
|
|
|
|
# Corresponds to the JSON property `dataSourceId`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :data_source_id
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@data_source_id = args[:data_source_id] if args.key?(:data_source_id)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-09-20 00:35:54 +00:00
|
|
|
# A request to delete developer metadata.
|
|
|
|
class DeleteDeveloperMetadataRequest
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# Filter that describes what data should be selected or returned from a request.
|
2017-09-20 00:35:54 +00:00
|
|
|
# Corresponds to the JSON property `dataFilter`
|
|
|
|
# @return [Google::Apis::SheetsV4::DataFilter]
|
|
|
|
attr_accessor :data_filter
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@data_filter = args[:data_filter] if args.key?(:data_filter)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
# The response from deleting developer metadata.
|
|
|
|
class DeleteDeveloperMetadataResponse
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
|
|
|
# The metadata that was deleted.
|
|
|
|
# Corresponds to the JSON property `deletedDeveloperMetadata`
|
|
|
|
# @return [Array<Google::Apis::SheetsV4::DeveloperMetadata>]
|
|
|
|
attr_accessor :deleted_developer_metadata
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@deleted_developer_metadata = args[:deleted_developer_metadata] if args.key?(:deleted_developer_metadata)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2018-05-08 00:35:49 +00:00
|
|
|
# Deletes a group over the specified range by decrementing the depth of the
|
2020-08-18 00:38:22 +00:00
|
|
|
# dimensions in the range. For example, assume the sheet has a depth-1 group
|
|
|
|
# over B:E and a depth-2 group over C:D. Deleting a group over D:E leaves the
|
|
|
|
# sheet with a depth-1 group over B:D and a depth-2 group over C:C.
|
2018-05-08 00:35:49 +00:00
|
|
|
class DeleteDimensionGroupRequest
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# A range along a single dimension on a sheet. All indexes are zero-based.
|
|
|
|
# Indexes are half open: the start index is inclusive and the end index is
|
|
|
|
# exclusive. Missing indexes indicate the range is unbounded on that side.
|
2018-05-08 00:35:49 +00:00
|
|
|
# Corresponds to the JSON property `range`
|
|
|
|
# @return [Google::Apis::SheetsV4::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
|
|
|
|
|
|
|
|
# The result of deleting a group.
|
|
|
|
class DeleteDimensionGroupResponse
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
|
|
|
# All groups of a dimension after deleting a group from that dimension.
|
|
|
|
# Corresponds to the JSON property `dimensionGroups`
|
|
|
|
# @return [Array<Google::Apis::SheetsV4::DimensionGroup>]
|
|
|
|
attr_accessor :dimension_groups
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@dimension_groups = args[:dimension_groups] if args.key?(:dimension_groups)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Deletes the dimensions from the sheet.
|
|
|
|
class DeleteDimensionRequest
|
2017-07-12 20:10:42 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# A range along a single dimension on a sheet. All indexes are zero-based.
|
|
|
|
# Indexes are half open: the start index is inclusive and the end index is
|
|
|
|
# exclusive. Missing indexes indicate the range is unbounded on that side.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `range`
|
|
|
|
# @return [Google::Apis::SheetsV4::DimensionRange]
|
|
|
|
attr_accessor :range
|
2017-07-12 20:10:42 +00:00
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@range = args[:range] if args.key?(:range)
|
2017-07-12 20:10:42 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2019-08-15 00:37:46 +00:00
|
|
|
# Removes rows within this range that contain values in the specified columns
|
|
|
|
# that are duplicates of values in any previous row. Rows with identical values
|
|
|
|
# but different letter cases, formatting, or formulas are considered to be
|
2020-08-18 00:38:22 +00:00
|
|
|
# duplicates. This request also removes duplicate rows hidden from view (for
|
|
|
|
# example, due to a filter). When removing duplicates, the first instance of
|
|
|
|
# each duplicate row scanning from the top downwards is kept in the resulting
|
|
|
|
# range. Content outside of the specified range isn't removed, and rows
|
|
|
|
# considered duplicates do not have to be adjacent to each other in the range.
|
2019-07-23 00:37:37 +00:00
|
|
|
class DeleteDuplicatesRequest
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
|
|
|
# The columns in the range to analyze for duplicate values. If no columns are
|
|
|
|
# selected then all columns are analyzed for duplicates.
|
|
|
|
# Corresponds to the JSON property `comparisonColumns`
|
|
|
|
# @return [Array<Google::Apis::SheetsV4::DimensionRange>]
|
|
|
|
attr_accessor :comparison_columns
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# A range on a sheet. All indexes are zero-based. Indexes are half open, i.e.
|
|
|
|
# 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 sheet 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!`.
|
2019-07-23 00:37:37 +00:00
|
|
|
# Corresponds to the JSON property `range`
|
|
|
|
# @return [Google::Apis::SheetsV4::GridRange]
|
|
|
|
attr_accessor :range
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@comparison_columns = args[:comparison_columns] if args.key?(:comparison_columns)
|
|
|
|
@range = args[:range] if args.key?(:range)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
# The result of removing duplicates in a range.
|
|
|
|
class DeleteDuplicatesResponse
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
|
|
|
# The number of duplicate rows removed.
|
|
|
|
# Corresponds to the JSON property `duplicatesRemovedCount`
|
|
|
|
# @return [Fixnum]
|
|
|
|
attr_accessor :duplicates_removed_count
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@duplicates_removed_count = args[:duplicates_removed_count] if args.key?(:duplicates_removed_count)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Deletes the embedded object with the given ID.
|
|
|
|
class DeleteEmbeddedObjectRequest
|
2017-07-12 20:10:42 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The ID of the embedded object to delete.
|
|
|
|
# Corresponds to the JSON property `objectId`
|
|
|
|
# @return [Fixnum]
|
|
|
|
attr_accessor :object_id_prop
|
2017-07-12 20:10:42 +00:00
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop)
|
2017-07-12 20:10:42 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Deletes a particular filter view.
|
|
|
|
class DeleteFilterViewRequest
|
2017-07-12 20:10:42 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The ID of the filter to delete.
|
|
|
|
# Corresponds to the JSON property `filterId`
|
|
|
|
# @return [Fixnum]
|
|
|
|
attr_accessor :filter_id
|
2017-07-12 20:10:42 +00:00
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@filter_id = args[:filter_id] if args.key?(:filter_id)
|
2017-07-12 20:10:42 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Removes the named range with the given ID from the spreadsheet.
|
|
|
|
class DeleteNamedRangeRequest
|
2017-07-12 20:10:42 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The ID of the named range to delete.
|
|
|
|
# Corresponds to the JSON property `namedRangeId`
|
2017-07-12 20:10:42 +00:00
|
|
|
# @return [String]
|
2017-08-25 19:54:22 +00:00
|
|
|
attr_accessor :named_range_id
|
2017-07-12 20:10:42 +00:00
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@named_range_id = args[:named_range_id] if args.key?(:named_range_id)
|
2017-07-12 20:10:42 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Deletes the protected range with the given ID.
|
|
|
|
class DeleteProtectedRangeRequest
|
2017-07-12 20:10:42 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The ID of the protected range to delete.
|
|
|
|
# Corresponds to the JSON property `protectedRangeId`
|
2017-07-12 20:10:42 +00:00
|
|
|
# @return [Fixnum]
|
2017-08-25 19:54:22 +00:00
|
|
|
attr_accessor :protected_range_id
|
2017-07-12 20:10:42 +00:00
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@protected_range_id = args[:protected_range_id] if args.key?(:protected_range_id)
|
2017-07-12 20:10:42 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Deletes a range of cells, shifting other cells into the deleted area.
|
|
|
|
class DeleteRangeRequest
|
2017-07-12 20:10:42 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# A range on a sheet. All indexes are zero-based. Indexes are half open, i.e.
|
|
|
|
# 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 sheet 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!`.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `range`
|
|
|
|
# @return [Google::Apis::SheetsV4::GridRange]
|
|
|
|
attr_accessor :range
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The dimension from which deleted cells will be replaced with. If ROWS,
|
|
|
|
# existing cells will be shifted upward to replace the deleted cells. If COLUMNS,
|
|
|
|
# existing cells will be shifted left to replace the deleted cells.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `shiftDimension`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :shift_dimension
|
2017-07-12 20:10:42 +00:00
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@range = args[:range] if args.key?(:range)
|
|
|
|
@shift_dimension = args[:shift_dimension] if args.key?(:shift_dimension)
|
|
|
|
end
|
2017-07-12 20:10:42 +00:00
|
|
|
end
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Deletes the requested sheet.
|
|
|
|
class DeleteSheetRequest
|
2017-07-12 20:10:42 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2020-09-29 00:38:39 +00:00
|
|
|
# The ID of the sheet to delete. If the sheet is of SheetType.DATA_SOURCE type,
|
|
|
|
# the associated DataSource is also deleted.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `sheetId`
|
2017-07-12 20:10:42 +00:00
|
|
|
# @return [Fixnum]
|
2017-08-25 19:54:22 +00:00
|
|
|
attr_accessor :sheet_id
|
2017-07-12 20:10:42 +00:00
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@sheet_id = args[:sheet_id] if args.key?(:sheet_id)
|
2017-07-12 20:10:42 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-09-20 00:35:54 +00:00
|
|
|
# Developer metadata associated with a location or object in a spreadsheet.
|
2020-08-18 00:38:22 +00:00
|
|
|
# Developer metadata may be used to associate arbitrary data with various parts
|
|
|
|
# of a spreadsheet and will remain associated at those locations as they move
|
|
|
|
# around and the spreadsheet is edited. For example, if developer metadata is
|
|
|
|
# associated with row 5 and another row is then subsequently inserted above row
|
|
|
|
# 5, that original metadata will still be associated with the row it was first
|
|
|
|
# associated with (what is now row 6). If the associated object is deleted its
|
|
|
|
# metadata is deleted too.
|
2017-09-20 00:35:54 +00:00
|
|
|
class DeveloperMetadata
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
|
|
|
# A location where metadata may be associated in a spreadsheet.
|
|
|
|
# Corresponds to the JSON property `location`
|
|
|
|
# @return [Google::Apis::SheetsV4::DeveloperMetadataLocation]
|
|
|
|
attr_accessor :location
|
|
|
|
|
|
|
|
# The spreadsheet-scoped unique ID that identifies the metadata. IDs may be
|
2020-08-18 00:38:22 +00:00
|
|
|
# specified when metadata is created, otherwise one will be randomly generated
|
|
|
|
# and assigned. Must be positive.
|
2017-09-20 00:35:54 +00:00
|
|
|
# Corresponds to the JSON property `metadataId`
|
|
|
|
# @return [Fixnum]
|
|
|
|
attr_accessor :metadata_id
|
|
|
|
|
|
|
|
# The metadata key. There may be multiple metadata in a spreadsheet with the
|
2020-08-18 00:38:22 +00:00
|
|
|
# same key. Developer metadata must always have a key specified.
|
2017-09-20 00:35:54 +00:00
|
|
|
# Corresponds to the JSON property `metadataKey`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :metadata_key
|
|
|
|
|
|
|
|
# Data associated with the metadata's key.
|
|
|
|
# Corresponds to the JSON property `metadataValue`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :metadata_value
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The metadata visibility. Developer metadata must always have a visibility
|
2017-09-20 00:35:54 +00:00
|
|
|
# specified.
|
|
|
|
# Corresponds to the JSON property `visibility`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :visibility
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@location = args[:location] if args.key?(:location)
|
|
|
|
@metadata_id = args[:metadata_id] if args.key?(:metadata_id)
|
|
|
|
@metadata_key = args[:metadata_key] if args.key?(:metadata_key)
|
|
|
|
@metadata_value = args[:metadata_value] if args.key?(:metadata_value)
|
|
|
|
@visibility = args[:visibility] if args.key?(:visibility)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
# A location where metadata may be associated in a spreadsheet.
|
|
|
|
class DeveloperMetadataLocation
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# A range along a single dimension on a sheet. All indexes are zero-based.
|
|
|
|
# Indexes are half open: the start index is inclusive and the end index is
|
|
|
|
# exclusive. Missing indexes indicate the range is unbounded on that side.
|
2017-09-20 00:35:54 +00:00
|
|
|
# Corresponds to the JSON property `dimensionRange`
|
|
|
|
# @return [Google::Apis::SheetsV4::DimensionRange]
|
|
|
|
attr_accessor :dimension_range
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The type of location this object represents. This field is read-only.
|
2017-09-20 00:35:54 +00:00
|
|
|
# Corresponds to the JSON property `locationType`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :location_type
|
|
|
|
|
|
|
|
# The ID of the sheet when metadata is associated with an entire sheet.
|
|
|
|
# Corresponds to the JSON property `sheetId`
|
|
|
|
# @return [Fixnum]
|
|
|
|
attr_accessor :sheet_id
|
|
|
|
|
|
|
|
# True when metadata is associated with an entire spreadsheet.
|
|
|
|
# Corresponds to the JSON property `spreadsheet`
|
|
|
|
# @return [Boolean]
|
|
|
|
attr_accessor :spreadsheet
|
|
|
|
alias_method :spreadsheet?, :spreadsheet
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@dimension_range = args[:dimension_range] if args.key?(:dimension_range)
|
|
|
|
@location_type = args[:location_type] if args.key?(:location_type)
|
|
|
|
@sheet_id = args[:sheet_id] if args.key?(:sheet_id)
|
|
|
|
@spreadsheet = args[:spreadsheet] if args.key?(:spreadsheet)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# Selects DeveloperMetadata that matches all of the specified fields. For
|
2017-10-03 00:35:28 +00:00
|
|
|
# example, if only a metadata ID is specified this considers the
|
2017-09-20 00:35:54 +00:00
|
|
|
# DeveloperMetadata with that particular unique ID. If a metadata key is
|
2020-08-18 00:38:22 +00:00
|
|
|
# specified, this considers all developer metadata with that key. If a key,
|
|
|
|
# visibility, and location type are all specified, this considers all developer
|
|
|
|
# metadata with that key and visibility that are associated with a location of
|
|
|
|
# that type. In general, this selects all DeveloperMetadata that matches the
|
|
|
|
# intersection of all the specified fields; any field or combination of fields
|
|
|
|
# may be specified.
|
2017-09-20 00:35:54 +00:00
|
|
|
class DeveloperMetadataLookup
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# Determines how this lookup matches the location. If this field is specified as
|
|
|
|
# EXACT, only developer metadata associated on the exact location specified is
|
|
|
|
# matched. If this field is specified to INTERSECTING, developer metadata
|
|
|
|
# associated on intersecting locations is also matched. If left unspecified,
|
|
|
|
# this field assumes a default value of INTERSECTING. If this field is specified,
|
|
|
|
# a metadataLocation must also be specified.
|
2017-09-20 00:35:54 +00:00
|
|
|
# Corresponds to the JSON property `locationMatchingStrategy`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :location_matching_strategy
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# Limits the selected developer metadata to those entries which are associated
|
|
|
|
# with locations of the specified type. For example, when this field is
|
|
|
|
# specified as ROW this lookup only considers developer metadata associated on
|
|
|
|
# rows. If the field is left unspecified, all location types are considered.
|
|
|
|
# This field cannot be specified as SPREADSHEET when the
|
|
|
|
# locationMatchingStrategy is specified as INTERSECTING or when the
|
|
|
|
# metadataLocation is specified as a non-spreadsheet location: spreadsheet
|
|
|
|
# metadata cannot intersect any other developer metadata location. This field
|
|
|
|
# also must be left unspecified when the locationMatchingStrategy is specified
|
|
|
|
# as EXACT.
|
2017-09-20 00:35:54 +00:00
|
|
|
# Corresponds to the JSON property `locationType`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :location_type
|
|
|
|
|
|
|
|
# Limits the selected developer metadata to that which has a matching
|
|
|
|
# DeveloperMetadata.metadata_id.
|
|
|
|
# Corresponds to the JSON property `metadataId`
|
|
|
|
# @return [Fixnum]
|
|
|
|
attr_accessor :metadata_id
|
|
|
|
|
|
|
|
# Limits the selected developer metadata to that which has a matching
|
|
|
|
# DeveloperMetadata.metadata_key.
|
|
|
|
# Corresponds to the JSON property `metadataKey`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :metadata_key
|
|
|
|
|
|
|
|
# A location where metadata may be associated in a spreadsheet.
|
|
|
|
# Corresponds to the JSON property `metadataLocation`
|
|
|
|
# @return [Google::Apis::SheetsV4::DeveloperMetadataLocation]
|
|
|
|
attr_accessor :metadata_location
|
|
|
|
|
|
|
|
# Limits the selected developer metadata to that which has a matching
|
|
|
|
# DeveloperMetadata.metadata_value.
|
|
|
|
# Corresponds to the JSON property `metadataValue`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :metadata_value
|
|
|
|
|
|
|
|
# Limits the selected developer metadata to that which has a matching
|
2020-08-18 00:38:22 +00:00
|
|
|
# DeveloperMetadata.visibility. If left unspecified, all developer metadata
|
|
|
|
# visibile to the requesting project is considered.
|
2017-09-20 00:35:54 +00:00
|
|
|
# Corresponds to the JSON property `visibility`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :visibility
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@location_matching_strategy = args[:location_matching_strategy] if args.key?(:location_matching_strategy)
|
|
|
|
@location_type = args[:location_type] if args.key?(:location_type)
|
|
|
|
@metadata_id = args[:metadata_id] if args.key?(:metadata_id)
|
|
|
|
@metadata_key = args[:metadata_key] if args.key?(:metadata_key)
|
|
|
|
@metadata_location = args[:metadata_location] if args.key?(:metadata_location)
|
|
|
|
@metadata_value = args[:metadata_value] if args.key?(:metadata_value)
|
|
|
|
@visibility = args[:visibility] if args.key?(:visibility)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2018-05-08 00:35:49 +00:00
|
|
|
# A group over an interval of rows or columns on a sheet, which can contain or
|
|
|
|
# be contained within other groups. A group can be collapsed or expanded as a
|
|
|
|
# unit on the sheet.
|
|
|
|
class DimensionGroup
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2018-05-23 00:36:42 +00:00
|
|
|
# This field is true if this group is collapsed. A collapsed group remains
|
2020-08-18 00:38:22 +00:00
|
|
|
# collapsed if an overlapping group at a shallower depth is expanded. A true
|
|
|
|
# value does not imply that all dimensions within the group are hidden, since a
|
|
|
|
# dimension's visibility can change independently from this group property.
|
|
|
|
# However, when this property is updated, all dimensions within it are set to
|
|
|
|
# hidden if this field is true, or set to visible if this field is false.
|
2018-05-08 00:35:49 +00:00
|
|
|
# Corresponds to the JSON property `collapsed`
|
|
|
|
# @return [Boolean]
|
|
|
|
attr_accessor :collapsed
|
|
|
|
alias_method :collapsed?, :collapsed
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The depth of the group, representing how many groups have a range that wholly
|
|
|
|
# contains the range of this group.
|
2018-05-08 00:35:49 +00:00
|
|
|
# Corresponds to the JSON property `depth`
|
|
|
|
# @return [Fixnum]
|
|
|
|
attr_accessor :depth
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# A range along a single dimension on a sheet. All indexes are zero-based.
|
|
|
|
# Indexes are half open: the start index is inclusive and the end index is
|
|
|
|
# exclusive. Missing indexes indicate the range is unbounded on that side.
|
2018-05-08 00:35:49 +00:00
|
|
|
# Corresponds to the JSON property `range`
|
|
|
|
# @return [Google::Apis::SheetsV4::DimensionRange]
|
|
|
|
attr_accessor :range
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@collapsed = args[:collapsed] if args.key?(:collapsed)
|
|
|
|
@depth = args[:depth] if args.key?(:depth)
|
|
|
|
@range = args[:range] if args.key?(:range)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Properties about a dimension.
|
|
|
|
class DimensionProperties
|
2017-07-12 20:10:42 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2020-09-29 00:38:39 +00:00
|
|
|
# An unique identifier that references a data source column.
|
2020-08-28 00:38:58 +00:00
|
|
|
# Corresponds to the JSON property `dataSourceColumnReference`
|
|
|
|
# @return [Google::Apis::SheetsV4::DataSourceColumnReference]
|
|
|
|
attr_accessor :data_source_column_reference
|
|
|
|
|
2017-09-20 00:35:54 +00:00
|
|
|
# The developer metadata associated with a single row or column.
|
|
|
|
# Corresponds to the JSON property `developerMetadata`
|
|
|
|
# @return [Array<Google::Apis::SheetsV4::DeveloperMetadata>]
|
|
|
|
attr_accessor :developer_metadata
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# True if this dimension is being filtered. This field is read-only.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `hiddenByFilter`
|
|
|
|
# @return [Boolean]
|
|
|
|
attr_accessor :hidden_by_filter
|
|
|
|
alias_method :hidden_by_filter?, :hidden_by_filter
|
2017-07-12 20:10:42 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# True if this dimension is explicitly hidden.
|
|
|
|
# Corresponds to the JSON property `hiddenByUser`
|
2017-07-12 20:10:42 +00:00
|
|
|
# @return [Boolean]
|
2017-08-25 19:54:22 +00:00
|
|
|
attr_accessor :hidden_by_user
|
|
|
|
alias_method :hidden_by_user?, :hidden_by_user
|
|
|
|
|
|
|
|
# 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
|
2017-06-02 06:11:31 +00:00
|
|
|
|
2017-07-12 20:10:42 +00:00
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2020-08-28 00:38:58 +00:00
|
|
|
@data_source_column_reference = args[:data_source_column_reference] if args.key?(:data_source_column_reference)
|
2017-09-20 00:35:54 +00:00
|
|
|
@developer_metadata = args[:developer_metadata] if args.key?(:developer_metadata)
|
2017-08-25 19:54:22 +00:00
|
|
|
@hidden_by_filter = args[:hidden_by_filter] if args.key?(:hidden_by_filter)
|
|
|
|
@hidden_by_user = args[:hidden_by_user] if args.key?(:hidden_by_user)
|
|
|
|
@pixel_size = args[:pixel_size] if args.key?(:pixel_size)
|
2017-07-12 20:10:42 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# A range along a single dimension on a sheet. All indexes are zero-based.
|
|
|
|
# Indexes are half open: the start index is inclusive and the end index is
|
|
|
|
# exclusive. Missing indexes indicate the range is unbounded on that side.
|
2017-08-25 19:54:22 +00:00
|
|
|
class DimensionRange
|
2017-07-12 20:10:42 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The dimension of the span.
|
|
|
|
# Corresponds to the JSON property `dimension`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :dimension
|
2017-07-12 20:10:42 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The end (exclusive) of the span, or not set if unbounded.
|
|
|
|
# Corresponds to the JSON property `endIndex`
|
|
|
|
# @return [Fixnum]
|
|
|
|
attr_accessor :end_index
|
2017-07-12 20:10:42 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The sheet this span is on.
|
|
|
|
# Corresponds to the JSON property `sheetId`
|
|
|
|
# @return [Fixnum]
|
|
|
|
attr_accessor :sheet_id
|
2017-07-12 20:10:42 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The start (inclusive) of the span, or not set if unbounded.
|
|
|
|
# Corresponds to the JSON property `startIndex`
|
|
|
|
# @return [Fixnum]
|
|
|
|
attr_accessor :start_index
|
2017-07-12 20:10:42 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@dimension = args[:dimension] if args.key?(:dimension)
|
|
|
|
@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)
|
|
|
|
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
|
2017-05-26 16:44:32 +00:00
|
|
|
|
2017-03-31 19:53:27 +00:00
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@filter_id = args[:filter_id] if args.key?(:filter_id)
|
2017-03-31 19:53:27 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The result of a filter view being duplicated.
|
|
|
|
class DuplicateFilterViewResponse
|
2017-03-30 22:30:51 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2017-07-12 20:10:42 +00:00
|
|
|
# A filter view.
|
|
|
|
# Corresponds to the JSON property `filter`
|
|
|
|
# @return [Google::Apis::SheetsV4::FilterView]
|
|
|
|
attr_accessor :filter
|
|
|
|
|
2017-03-30 22:30:51 +00:00
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-07-12 20:10:42 +00:00
|
|
|
@filter = args[:filter] if args.key?(:filter)
|
2017-03-30 22:30:51 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Duplicates the contents of a sheet.
|
|
|
|
class DuplicateSheetRequest
|
2017-07-12 20:10:42 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The zero-based index where the new sheet should be inserted. The index of all
|
|
|
|
# sheets after this are incremented.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `insertSheetIndex`
|
|
|
|
# @return [Fixnum]
|
|
|
|
attr_accessor :insert_sheet_index
|
2017-07-12 20:10:42 +00:00
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# 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. If set, it must be non-negative.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `newSheetId`
|
|
|
|
# @return [Fixnum]
|
|
|
|
attr_accessor :new_sheet_id
|
2017-07-12 20:10:42 +00:00
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The name of the new sheet. If empty, a new name is chosen for you.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `newSheetName`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :new_sheet_name
|
|
|
|
|
2020-09-29 00:38:39 +00:00
|
|
|
# The sheet to duplicate. If the source sheet is of DATA_SOURCE type, its
|
|
|
|
# backing DataSource is also duplicated and associated with the new copy of the
|
|
|
|
# sheet. No data execution is triggered, the grid data of this sheet is also
|
|
|
|
# copied over but only available after the batch request completes.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `sourceSheetId`
|
|
|
|
# @return [Fixnum]
|
|
|
|
attr_accessor :source_sheet_id
|
2017-07-12 20:10:42 +00:00
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@insert_sheet_index = args[:insert_sheet_index] if args.key?(:insert_sheet_index)
|
|
|
|
@new_sheet_id = args[:new_sheet_id] if args.key?(:new_sheet_id)
|
|
|
|
@new_sheet_name = args[:new_sheet_name] if args.key?(:new_sheet_name)
|
|
|
|
@source_sheet_id = args[:source_sheet_id] if args.key?(:source_sheet_id)
|
2017-07-12 20:10:42 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The result of duplicating a sheet.
|
|
|
|
class DuplicateSheetResponse
|
2017-03-30 22:30:51 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Properties of a sheet.
|
|
|
|
# Corresponds to the JSON property `properties`
|
|
|
|
# @return [Google::Apis::SheetsV4::SheetProperties]
|
|
|
|
attr_accessor :properties
|
2017-07-12 20:10:42 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
2017-06-14 17:02:03 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@properties = args[:properties] if args.key?(:properties)
|
|
|
|
end
|
|
|
|
end
|
2017-07-12 20:10:42 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The editors of a protected range.
|
|
|
|
class Editors
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# 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.
|
2017-08-25 19:54:22 +00:00
|
|
|
# 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<String>]
|
|
|
|
attr_accessor :groups
|
|
|
|
|
|
|
|
# The email addresses of users with edit access to the protected range.
|
|
|
|
# Corresponds to the JSON property `users`
|
|
|
|
# @return [Array<String>]
|
|
|
|
attr_accessor :users
|
2017-05-26 16:44:32 +00:00
|
|
|
|
2017-03-30 22:30:51 +00:00
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@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)
|
2017-03-30 22:30:51 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# A chart embedded in a sheet.
|
|
|
|
class EmbeddedChart
|
2017-03-30 22:30:51 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The ID of the chart.
|
|
|
|
# Corresponds to the JSON property `chartId`
|
|
|
|
# @return [Fixnum]
|
|
|
|
attr_accessor :chart_id
|
2017-06-02 06:11:31 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The position of an embedded object such as a chart.
|
|
|
|
# Corresponds to the JSON property `position`
|
|
|
|
# @return [Google::Apis::SheetsV4::EmbeddedObjectPosition]
|
|
|
|
attr_accessor :position
|
2017-03-30 22:30:51 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The specifications of a chart.
|
|
|
|
# Corresponds to the JSON property `spec`
|
|
|
|
# @return [Google::Apis::SheetsV4::ChartSpec]
|
|
|
|
attr_accessor :spec
|
2017-06-14 17:02:03 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
2017-06-14 17:02:03 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@chart_id = args[:chart_id] if args.key?(:chart_id)
|
|
|
|
@position = args[:position] if args.key?(:position)
|
|
|
|
@spec = args[:spec] if args.key?(:spec)
|
|
|
|
end
|
|
|
|
end
|
2017-06-14 17:02:03 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The position of an embedded object such as a chart.
|
|
|
|
class EmbeddedObjectPosition
|
|
|
|
include Google::Apis::Core::Hashable
|
2017-06-14 17:02:03 +00:00
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# If true, the embedded object is put on a new sheet whose ID is chosen for you.
|
|
|
|
# Used only when writing.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `newSheet`
|
|
|
|
# @return [Boolean]
|
|
|
|
attr_accessor :new_sheet
|
|
|
|
alias_method :new_sheet?, :new_sheet
|
2017-06-14 17:02:03 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The location an object is overlaid on top of a grid.
|
|
|
|
# Corresponds to the JSON property `overlayPosition`
|
|
|
|
# @return [Google::Apis::SheetsV4::OverlayPosition]
|
|
|
|
attr_accessor :overlay_position
|
2017-06-14 17:02:03 +00:00
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The sheet this is on. Set only if the embedded object is on its own sheet.
|
|
|
|
# Must be non-negative.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `sheetId`
|
|
|
|
# @return [Fixnum]
|
|
|
|
attr_accessor :sheet_id
|
2017-06-14 17:02:03 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
2017-06-14 17:02:03 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@new_sheet = args[:new_sheet] if args.key?(:new_sheet)
|
|
|
|
@overlay_position = args[:overlay_position] if args.key?(:overlay_position)
|
|
|
|
@sheet_id = args[:sheet_id] if args.key?(:sheet_id)
|
|
|
|
end
|
|
|
|
end
|
2017-06-14 17:02:03 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# An error in a cell.
|
|
|
|
class ErrorValue
|
|
|
|
include Google::Apis::Core::Hashable
|
2017-06-14 17:02:03 +00:00
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# A message with more information about the error (in the spreadsheet's locale).
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `message`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :message
|
2017-06-14 17:02:03 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The type of error.
|
|
|
|
# Corresponds to the JSON property `type`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :type
|
2017-06-14 17:02:03 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
2017-06-14 17:02:03 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@message = args[:message] if args.key?(:message)
|
|
|
|
@type = args[:type] if args.key?(:type)
|
|
|
|
end
|
|
|
|
end
|
2017-06-14 17:02:03 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The kinds of value that a cell in a spreadsheet can have.
|
|
|
|
class ExtendedValue
|
|
|
|
include Google::Apis::Core::Hashable
|
2017-06-14 17:02:03 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Represents a boolean value.
|
|
|
|
# Corresponds to the JSON property `boolValue`
|
|
|
|
# @return [Boolean]
|
|
|
|
attr_accessor :bool_value
|
|
|
|
alias_method :bool_value?, :bool_value
|
2017-06-14 17:02:03 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# An error in a cell.
|
|
|
|
# Corresponds to the JSON property `errorValue`
|
|
|
|
# @return [Google::Apis::SheetsV4::ErrorValue]
|
|
|
|
attr_accessor :error_value
|
2017-06-14 17:02:03 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Represents a formula.
|
|
|
|
# Corresponds to the JSON property `formulaValue`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :formula_value
|
2017-07-12 20:10:42 +00:00
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# Represents a double value. Note: Dates, Times and DateTimes are represented as
|
|
|
|
# doubles in "serial number" format.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `numberValue`
|
|
|
|
# @return [Float]
|
|
|
|
attr_accessor :number_value
|
2017-04-03 20:18:48 +00:00
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# 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 `
|
|
|
|
# stringValue` of `"123"`.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `stringValue`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :string_value
|
2017-04-03 20:18:48 +00:00
|
|
|
|
2017-05-26 16:44:32 +00:00
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
2017-04-03 20:18:48 +00:00
|
|
|
|
2017-05-26 16:44:32 +00:00
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@bool_value = args[:bool_value] if args.key?(:bool_value)
|
|
|
|
@error_value = args[:error_value] if args.key?(:error_value)
|
|
|
|
@formula_value = args[:formula_value] if args.key?(:formula_value)
|
|
|
|
@number_value = args[:number_value] if args.key?(:number_value)
|
|
|
|
@string_value = args[:string_value] if args.key?(:string_value)
|
2017-05-26 16:44:32 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Criteria for showing/hiding rows in a filter or filter view.
|
|
|
|
class FilterCriteria
|
2017-05-26 16:44:32 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# A condition that can evaluate to true or false. BooleanConditions are used by
|
|
|
|
# conditional formatting, data validation, and the criteria in filters.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `condition`
|
|
|
|
# @return [Google::Apis::SheetsV4::BooleanCondition]
|
|
|
|
attr_accessor :condition
|
2017-05-26 16:44:32 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Values that should be hidden.
|
|
|
|
# Corresponds to the JSON property `hiddenValues`
|
|
|
|
# @return [Array<String>]
|
|
|
|
attr_accessor :hidden_values
|
2017-05-26 16:44:32 +00:00
|
|
|
|
2019-11-05 00:36:31 +00:00
|
|
|
# Represents a color in the RGBA color space. This representation is designed
|
|
|
|
# for simplicity of conversion to/from color representations in various
|
2020-08-18 00:38:22 +00:00
|
|
|
# languages over compactness; for example, the fields of this representation can
|
|
|
|
# be trivially provided to the constructor of "java.awt.Color" in Java; it can
|
|
|
|
# also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
|
|
|
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
|
|
|
# CSS "rgba()" string in JavaScript, as well. Note: this proto does not carry
|
|
|
|
# information about the absolute color space that should be used to interpret
|
|
|
|
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
|
|
|
# applications SHOULD assume the sRGB color space. Note: when color equality
|
|
|
|
# needs to be decided, implementations, unless documented otherwise, will treat
|
|
|
|
# two colors to be equal if all their red, green, blue and alpha values each
|
|
|
|
# differ by at most 1e-5. 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(''); `; // ...
|
2019-11-05 00:36:31 +00:00
|
|
|
# Corresponds to the JSON property `visibleBackgroundColor`
|
|
|
|
# @return [Google::Apis::SheetsV4::Color]
|
|
|
|
attr_accessor :visible_background_color
|
|
|
|
|
2020-02-05 00:37:38 +00:00
|
|
|
# A color value.
|
|
|
|
# Corresponds to the JSON property `visibleBackgroundColorStyle`
|
|
|
|
# @return [Google::Apis::SheetsV4::ColorStyle]
|
|
|
|
attr_accessor :visible_background_color_style
|
|
|
|
|
2019-11-05 00:36:31 +00:00
|
|
|
# Represents a color in the RGBA color space. This representation is designed
|
|
|
|
# for simplicity of conversion to/from color representations in various
|
2020-08-18 00:38:22 +00:00
|
|
|
# languages over compactness; for example, the fields of this representation can
|
|
|
|
# be trivially provided to the constructor of "java.awt.Color" in Java; it can
|
|
|
|
# also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
|
|
|
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
|
|
|
# CSS "rgba()" string in JavaScript, as well. Note: this proto does not carry
|
|
|
|
# information about the absolute color space that should be used to interpret
|
|
|
|
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
|
|
|
# applications SHOULD assume the sRGB color space. Note: when color equality
|
|
|
|
# needs to be decided, implementations, unless documented otherwise, will treat
|
|
|
|
# two colors to be equal if all their red, green, blue and alpha values each
|
|
|
|
# differ by at most 1e-5. 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(''); `; // ...
|
2019-11-05 00:36:31 +00:00
|
|
|
# Corresponds to the JSON property `visibleForegroundColor`
|
|
|
|
# @return [Google::Apis::SheetsV4::Color]
|
|
|
|
attr_accessor :visible_foreground_color
|
|
|
|
|
2020-02-05 00:37:38 +00:00
|
|
|
# A color value.
|
|
|
|
# Corresponds to the JSON property `visibleForegroundColorStyle`
|
|
|
|
# @return [Google::Apis::SheetsV4::ColorStyle]
|
|
|
|
attr_accessor :visible_foreground_color_style
|
|
|
|
|
2017-05-04 19:35:56 +00:00
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
2017-04-03 20:18:48 +00:00
|
|
|
|
2017-05-04 19:35:56 +00:00
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@condition = args[:condition] if args.key?(:condition)
|
|
|
|
@hidden_values = args[:hidden_values] if args.key?(:hidden_values)
|
2019-11-05 00:36:31 +00:00
|
|
|
@visible_background_color = args[:visible_background_color] if args.key?(:visible_background_color)
|
2020-02-05 00:37:38 +00:00
|
|
|
@visible_background_color_style = args[:visible_background_color_style] if args.key?(:visible_background_color_style)
|
2019-11-05 00:36:31 +00:00
|
|
|
@visible_foreground_color = args[:visible_foreground_color] if args.key?(:visible_foreground_color)
|
2020-02-05 00:37:38 +00:00
|
|
|
@visible_foreground_color_style = args[:visible_foreground_color_style] if args.key?(:visible_foreground_color_style)
|
2017-05-04 19:35:56 +00:00
|
|
|
end
|
|
|
|
end
|
2017-04-03 20:18:48 +00:00
|
|
|
|
2020-08-28 00:38:58 +00:00
|
|
|
# The filter criteria associated with a specific column.
|
|
|
|
class FilterSpec
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
|
|
|
# The column index.
|
|
|
|
# Corresponds to the JSON property `columnIndex`
|
|
|
|
# @return [Fixnum]
|
|
|
|
attr_accessor :column_index
|
|
|
|
|
2020-09-29 00:38:39 +00:00
|
|
|
# An unique identifier that references a data source column.
|
2020-08-28 00:38:58 +00:00
|
|
|
# Corresponds to the JSON property `dataSourceColumnReference`
|
|
|
|
# @return [Google::Apis::SheetsV4::DataSourceColumnReference]
|
|
|
|
attr_accessor :data_source_column_reference
|
|
|
|
|
|
|
|
# Criteria for showing/hiding rows in a filter or filter view.
|
|
|
|
# Corresponds to the JSON property `filterCriteria`
|
|
|
|
# @return [Google::Apis::SheetsV4::FilterCriteria]
|
|
|
|
attr_accessor :filter_criteria
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@column_index = args[:column_index] if args.key?(:column_index)
|
|
|
|
@data_source_column_reference = args[:data_source_column_reference] if args.key?(:data_source_column_reference)
|
|
|
|
@filter_criteria = args[:filter_criteria] if args.key?(:filter_criteria)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# A filter view.
|
|
|
|
class FilterView
|
2017-05-04 19:35:56 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
2017-04-03 20:18:48 +00:00
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The criteria for showing/hiding values per column. The map's key is the column
|
2020-09-29 00:38:39 +00:00
|
|
|
# index, and the value is the criteria for that column. This field is deprecated
|
|
|
|
# in favor of filter_specs.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `criteria`
|
|
|
|
# @return [Hash<String,Google::Apis::SheetsV4::FilterCriteria>]
|
|
|
|
attr_accessor :criteria
|
2017-06-14 17:02:03 +00:00
|
|
|
|
2020-08-28 00:38:58 +00:00
|
|
|
# The filter criteria for showing/hiding values per column. Both criteria and
|
|
|
|
# filter_specs are populated in responses. If both fields are specified in an
|
|
|
|
# update request, this field takes precedence.
|
|
|
|
# Corresponds to the JSON property `filterSpecs`
|
|
|
|
# @return [Array<Google::Apis::SheetsV4::FilterSpec>]
|
|
|
|
attr_accessor :filter_specs
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The ID of the filter view.
|
|
|
|
# Corresponds to the JSON property `filterViewId`
|
2017-07-12 20:10:42 +00:00
|
|
|
# @return [Fixnum]
|
2017-08-25 19:54:22 +00:00
|
|
|
attr_accessor :filter_view_id
|
2017-05-26 16:44:32 +00:00
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The named range this filter view is backed by, if any. When writing, only one
|
|
|
|
# of range or named_range_id may be set.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `namedRangeId`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :named_range_id
|
2017-05-26 16:44:32 +00:00
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# A range on a sheet. All indexes are zero-based. Indexes are half open, i.e.
|
|
|
|
# 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 sheet 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!`.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `range`
|
|
|
|
# @return [Google::Apis::SheetsV4::GridRange]
|
|
|
|
attr_accessor :range
|
2017-05-26 16:44:32 +00:00
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The sort order per column. Later specifications are used when values are equal
|
|
|
|
# in the earlier specifications.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `sortSpecs`
|
|
|
|
# @return [Array<Google::Apis::SheetsV4::SortSpec>]
|
|
|
|
attr_accessor :sort_specs
|
|
|
|
|
|
|
|
# The name of the filter view.
|
|
|
|
# Corresponds to the JSON property `title`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :title
|
2017-04-03 20:18:48 +00:00
|
|
|
|
2017-06-14 17:02:03 +00:00
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
2017-04-03 20:18:48 +00:00
|
|
|
|
2017-06-14 17:02:03 +00:00
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@criteria = args[:criteria] if args.key?(:criteria)
|
2020-08-28 00:38:58 +00:00
|
|
|
@filter_specs = args[:filter_specs] if args.key?(:filter_specs)
|
2017-08-25 19:54:22 +00:00
|
|
|
@filter_view_id = args[:filter_view_id] if args.key?(:filter_view_id)
|
|
|
|
@named_range_id = args[:named_range_id] if args.key?(:named_range_id)
|
|
|
|
@range = args[:range] if args.key?(:range)
|
|
|
|
@sort_specs = args[:sort_specs] if args.key?(:sort_specs)
|
|
|
|
@title = args[:title] if args.key?(:title)
|
2017-06-14 17:02:03 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Finds and replaces data in cells over a range, sheet, or all sheets.
|
|
|
|
class FindReplaceRequest
|
2017-06-14 17:02:03 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
2017-04-03 20:18:48 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# True to find/replace over all sheets.
|
|
|
|
# Corresponds to the JSON property `allSheets`
|
2017-06-14 17:02:03 +00:00
|
|
|
# @return [Boolean]
|
2017-08-25 19:54:22 +00:00
|
|
|
attr_accessor :all_sheets
|
|
|
|
alias_method :all_sheets?, :all_sheets
|
2017-04-03 20:18:48 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The value to search.
|
|
|
|
# Corresponds to the JSON property `find`
|
2017-07-12 20:10:42 +00:00
|
|
|
# @return [String]
|
2017-08-25 19:54:22 +00:00
|
|
|
attr_accessor :find
|
2017-04-03 20:18:48 +00:00
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# True if the search should include cells with formulas. False to skip cells
|
|
|
|
# with formulas.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `includeFormulas`
|
2017-07-12 20:10:42 +00:00
|
|
|
# @return [Boolean]
|
2017-08-25 19:54:22 +00:00
|
|
|
attr_accessor :include_formulas
|
|
|
|
alias_method :include_formulas?, :include_formulas
|
2017-06-02 06:11:31 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# True if the search is case sensitive.
|
|
|
|
# Corresponds to the JSON property `matchCase`
|
2017-07-12 20:10:42 +00:00
|
|
|
# @return [Boolean]
|
2017-08-25 19:54:22 +00:00
|
|
|
attr_accessor :match_case
|
|
|
|
alias_method :match_case?, :match_case
|
2017-06-14 17:02:03 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# 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
|
2017-06-14 17:02:03 +00:00
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# A range on a sheet. All indexes are zero-based. Indexes are half open, i.e.
|
|
|
|
# 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 sheet 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!`.
|
2017-07-12 20:10:42 +00:00
|
|
|
# Corresponds to the JSON property `range`
|
|
|
|
# @return [Google::Apis::SheetsV4::GridRange]
|
|
|
|
attr_accessor :range
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The value to use as the replacement.
|
|
|
|
# Corresponds to the JSON property `replacement`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :replacement
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# 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, if one cell has the contents `"Google Sheets"`
|
|
|
|
# and another has `"Google Docs"`, then searching for `"o.* (.*)"` with a
|
|
|
|
# replacement of `"$1 Rocks"` would change the contents of the cells to `"
|
|
|
|
# GSheets Rocks"` and `"GDocs Rocks"` respectively.
|
2017-08-25 19:54:22 +00:00
|
|
|
# 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
|
2017-06-14 17:02:03 +00:00
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@all_sheets = args[:all_sheets] if args.key?(:all_sheets)
|
|
|
|
@find = args[:find] if args.key?(:find)
|
|
|
|
@include_formulas = args[:include_formulas] if args.key?(:include_formulas)
|
|
|
|
@match_case = args[:match_case] if args.key?(:match_case)
|
|
|
|
@match_entire_cell = args[:match_entire_cell] if args.key?(:match_entire_cell)
|
2017-07-12 20:10:42 +00:00
|
|
|
@range = args[:range] if args.key?(:range)
|
2017-08-25 19:54:22 +00:00
|
|
|
@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)
|
2017-06-14 17:02:03 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The result of the find/replace.
|
|
|
|
class FindReplaceResponse
|
2017-06-14 17:02:03 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The number of formula cells changed.
|
|
|
|
# Corresponds to the JSON property `formulasChanged`
|
2017-07-12 20:10:42 +00:00
|
|
|
# @return [Fixnum]
|
2017-08-25 19:54:22 +00:00
|
|
|
attr_accessor :formulas_changed
|
2017-06-02 06:11:31 +00:00
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# 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"`.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `occurrencesChanged`
|
|
|
|
# @return [Fixnum]
|
|
|
|
attr_accessor :occurrences_changed
|
2017-07-12 20:10:42 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The number of rows changed.
|
|
|
|
# Corresponds to the JSON property `rowsChanged`
|
|
|
|
# @return [Fixnum]
|
|
|
|
attr_accessor :rows_changed
|
2017-07-12 20:10:42 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The number of sheets changed.
|
|
|
|
# Corresponds to the JSON property `sheetsChanged`
|
|
|
|
# @return [Fixnum]
|
|
|
|
attr_accessor :sheets_changed
|
2017-07-12 20:10:42 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The number of non-formula cells changed.
|
|
|
|
# Corresponds to the JSON property `valuesChanged`
|
|
|
|
# @return [Fixnum]
|
|
|
|
attr_accessor :values_changed
|
2017-07-12 20:10:42 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
2017-07-12 20:10:42 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@formulas_changed = args[:formulas_changed] if args.key?(:formulas_changed)
|
|
|
|
@occurrences_changed = args[:occurrences_changed] if args.key?(:occurrences_changed)
|
|
|
|
@rows_changed = args[:rows_changed] if args.key?(:rows_changed)
|
|
|
|
@sheets_changed = args[:sheets_changed] if args.key?(:sheets_changed)
|
|
|
|
@values_changed = args[:values_changed] if args.key?(:values_changed)
|
|
|
|
end
|
|
|
|
end
|
2017-03-30 22:30:51 +00:00
|
|
|
|
2017-09-20 00:35:54 +00:00
|
|
|
# The request for retrieving a Spreadsheet.
|
|
|
|
class GetSpreadsheetByDataFilterRequest
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The DataFilters used to select which ranges to retrieve from the spreadsheet.
|
2017-09-20 00:35:54 +00:00
|
|
|
# Corresponds to the JSON property `dataFilters`
|
|
|
|
# @return [Array<Google::Apis::SheetsV4::DataFilter>]
|
|
|
|
attr_accessor :data_filters
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# True if grid data should be returned. This parameter is ignored if a field
|
|
|
|
# mask was set in the request.
|
2017-09-20 00:35:54 +00:00
|
|
|
# Corresponds to the JSON property `includeGridData`
|
|
|
|
# @return [Boolean]
|
|
|
|
attr_accessor :include_grid_data
|
|
|
|
alias_method :include_grid_data?, :include_grid_data
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@data_filters = args[:data_filters] if args.key?(:data_filters)
|
|
|
|
@include_grid_data = args[:include_grid_data] if args.key?(:include_grid_data)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# 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.
|
2017-08-25 19:54:22 +00:00
|
|
|
class GradientRule
|
|
|
|
include Google::Apis::Core::Hashable
|
2017-06-14 17:02:03 +00:00
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# A single interpolation point on a gradient conditional format. These pin the
|
|
|
|
# gradient color scale according to the color, type and value chosen.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `maxpoint`
|
|
|
|
# @return [Google::Apis::SheetsV4::InterpolationPoint]
|
|
|
|
attr_accessor :maxpoint
|
2017-03-31 19:53:27 +00:00
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# A single interpolation point on a gradient conditional format. These pin the
|
|
|
|
# gradient color scale according to the color, type and value chosen.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `midpoint`
|
|
|
|
# @return [Google::Apis::SheetsV4::InterpolationPoint]
|
|
|
|
attr_accessor :midpoint
|
2017-06-14 17:02:03 +00:00
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# A single interpolation point on a gradient conditional format. These pin the
|
|
|
|
# gradient color scale according to the color, type and value chosen.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `minpoint`
|
|
|
|
# @return [Google::Apis::SheetsV4::InterpolationPoint]
|
|
|
|
attr_accessor :minpoint
|
2017-05-26 16:44:32 +00:00
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@maxpoint = args[:maxpoint] if args.key?(:maxpoint)
|
|
|
|
@midpoint = args[:midpoint] if args.key?(:midpoint)
|
|
|
|
@minpoint = args[:minpoint] if args.key?(:minpoint)
|
2017-05-26 16:44:32 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# A coordinate in a sheet. All indexes are zero-based.
|
2017-08-25 19:54:22 +00:00
|
|
|
class GridCoordinate
|
2017-05-26 16:44:32 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The column index of the coordinate.
|
|
|
|
# Corresponds to the JSON property `columnIndex`
|
|
|
|
# @return [Fixnum]
|
|
|
|
attr_accessor :column_index
|
2017-06-14 17:02:03 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The row index of the coordinate.
|
|
|
|
# Corresponds to the JSON property `rowIndex`
|
|
|
|
# @return [Fixnum]
|
|
|
|
attr_accessor :row_index
|
2017-07-12 20:10:42 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The sheet this coordinate is on.
|
|
|
|
# Corresponds to the JSON property `sheetId`
|
|
|
|
# @return [Fixnum]
|
|
|
|
attr_accessor :sheet_id
|
2017-06-14 17:02:03 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
2017-06-14 17:02:03 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@column_index = args[:column_index] if args.key?(:column_index)
|
|
|
|
@row_index = args[:row_index] if args.key?(:row_index)
|
|
|
|
@sheet_id = args[:sheet_id] if args.key?(:sheet_id)
|
|
|
|
end
|
|
|
|
end
|
2017-05-26 16:44:32 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Data in the grid, as well as metadata about the dimensions.
|
|
|
|
class GridData
|
|
|
|
include Google::Apis::Core::Hashable
|
2017-05-26 16:44:32 +00:00
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# Metadata about the requested columns in the grid, starting with the column in
|
|
|
|
# start_column.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `columnMetadata`
|
|
|
|
# @return [Array<Google::Apis::SheetsV4::DimensionProperties>]
|
|
|
|
attr_accessor :column_metadata
|
2017-05-26 16:44:32 +00:00
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# 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.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `rowData`
|
|
|
|
# @return [Array<Google::Apis::SheetsV4::RowData>]
|
|
|
|
attr_accessor :row_data
|
2017-05-26 16:44:32 +00:00
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# Metadata about the requested rows in the grid, starting with the row in
|
|
|
|
# start_row.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `rowMetadata`
|
|
|
|
# @return [Array<Google::Apis::SheetsV4::DimensionProperties>]
|
|
|
|
attr_accessor :row_metadata
|
2017-06-14 17:02:03 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The first column this GridData refers to, zero-based.
|
|
|
|
# Corresponds to the JSON property `startColumn`
|
|
|
|
# @return [Fixnum]
|
|
|
|
attr_accessor :start_column
|
|
|
|
|
|
|
|
# The first row this GridData refers to, zero-based.
|
|
|
|
# Corresponds to the JSON property `startRow`
|
|
|
|
# @return [Fixnum]
|
|
|
|
attr_accessor :start_row
|
2017-03-31 19:53:27 +00:00
|
|
|
|
2017-05-04 19:35:56 +00:00
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
2017-03-30 22:30:51 +00:00
|
|
|
|
2017-05-04 19:35:56 +00:00
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@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_column = args[:start_column] if args.key?(:start_column)
|
|
|
|
@start_row = args[:start_row] if args.key?(:start_row)
|
2017-05-04 19:35:56 +00:00
|
|
|
end
|
|
|
|
end
|
2017-03-30 22:30:51 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Properties of a grid.
|
|
|
|
class GridProperties
|
2017-05-04 19:35:56 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
2017-03-30 22:30:51 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The number of columns in the grid.
|
|
|
|
# Corresponds to the JSON property `columnCount`
|
|
|
|
# @return [Fixnum]
|
|
|
|
attr_accessor :column_count
|
2017-03-27 22:14:47 +00:00
|
|
|
|
2018-05-08 00:35:49 +00:00
|
|
|
# True if the column grouping control toggle is shown after the group.
|
|
|
|
# Corresponds to the JSON property `columnGroupControlAfter`
|
|
|
|
# @return [Boolean]
|
|
|
|
attr_accessor :column_group_control_after
|
|
|
|
alias_method :column_group_control_after?, :column_group_control_after
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The number of columns that are frozen in the grid.
|
|
|
|
# Corresponds to the JSON property `frozenColumnCount`
|
|
|
|
# @return [Fixnum]
|
|
|
|
attr_accessor :frozen_column_count
|
2017-06-14 17:02:03 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# 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`
|
2017-07-12 20:10:42 +00:00
|
|
|
# @return [Boolean]
|
2017-08-25 19:54:22 +00:00
|
|
|
attr_accessor :hide_gridlines
|
|
|
|
alias_method :hide_gridlines?, :hide_gridlines
|
2017-06-14 17:02:03 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The number of rows in the grid.
|
|
|
|
# Corresponds to the JSON property `rowCount`
|
|
|
|
# @return [Fixnum]
|
|
|
|
attr_accessor :row_count
|
2017-03-27 22:14:47 +00:00
|
|
|
|
2018-05-08 00:35:49 +00:00
|
|
|
# True if the row grouping control toggle is shown after the group.
|
|
|
|
# Corresponds to the JSON property `rowGroupControlAfter`
|
|
|
|
# @return [Boolean]
|
|
|
|
attr_accessor :row_group_control_after
|
|
|
|
alias_method :row_group_control_after?, :row_group_control_after
|
|
|
|
|
2017-01-28 03:38:40 +00:00
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@column_count = args[:column_count] if args.key?(:column_count)
|
2018-05-08 00:35:49 +00:00
|
|
|
@column_group_control_after = args[:column_group_control_after] if args.key?(:column_group_control_after)
|
2017-08-25 19:54:22 +00:00
|
|
|
@frozen_column_count = args[:frozen_column_count] if args.key?(:frozen_column_count)
|
|
|
|
@frozen_row_count = args[:frozen_row_count] if args.key?(:frozen_row_count)
|
|
|
|
@hide_gridlines = args[:hide_gridlines] if args.key?(:hide_gridlines)
|
|
|
|
@row_count = args[:row_count] if args.key?(:row_count)
|
2018-05-08 00:35:49 +00:00
|
|
|
@row_group_control_after = args[:row_group_control_after] if args.key?(:row_group_control_after)
|
2017-05-04 19:35:56 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# A range on a sheet. All indexes are zero-based. Indexes are half open, i.e.
|
|
|
|
# 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 sheet 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!`.
|
2017-08-25 19:54:22 +00:00
|
|
|
class GridRange
|
2017-01-25 07:37:13 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
2016-05-16 16:49:15 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The end column (exclusive) of the range, or not set if unbounded.
|
|
|
|
# Corresponds to the JSON property `endColumnIndex`
|
2017-07-12 20:10:42 +00:00
|
|
|
# @return [Fixnum]
|
2017-08-25 19:54:22 +00:00
|
|
|
attr_accessor :end_column_index
|
2017-07-12 20:10:42 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The end row (exclusive) of the range, or not set if unbounded.
|
|
|
|
# Corresponds to the JSON property `endRowIndex`
|
2017-07-12 20:10:42 +00:00
|
|
|
# @return [Fixnum]
|
2017-08-25 19:54:22 +00:00
|
|
|
attr_accessor :end_row_index
|
2017-07-12 20:10:42 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The sheet this range is on.
|
|
|
|
# Corresponds to the JSON property `sheetId`
|
2017-07-12 20:10:42 +00:00
|
|
|
# @return [Fixnum]
|
2017-08-25 19:54:22 +00:00
|
|
|
attr_accessor :sheet_id
|
2017-07-12 20:10:42 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The start column (inclusive) of the range, or not set if unbounded.
|
|
|
|
# Corresponds to the JSON property `startColumnIndex`
|
2017-07-12 20:10:42 +00:00
|
|
|
# @return [Fixnum]
|
2017-08-25 19:54:22 +00:00
|
|
|
attr_accessor :start_column_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
|
2017-03-31 19:53:27 +00:00
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@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)
|
|
|
|
@sheet_id = args[:sheet_id] if args.key?(:sheet_id)
|
|
|
|
@start_column_index = args[:start_column_index] if args.key?(:start_column_index)
|
|
|
|
@start_row_index = args[:start_row_index] if args.key?(:start_row_index)
|
2017-03-31 19:53:27 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# A histogram chart. A histogram chart groups data items into bins, displaying
|
|
|
|
# each bin as a column of stacked items. Histograms are used to display the
|
|
|
|
# distribution of a dataset. Each column of items represents a range into which
|
|
|
|
# those items fall. The number of bins can be chosen automatically or specified
|
2017-08-25 19:54:22 +00:00
|
|
|
# explicitly.
|
|
|
|
class HistogramChartSpec
|
2017-01-25 07:37:13 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
2016-05-16 16:49:15 +00:00
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# By default the bucket size (the range of values stacked in a single column) is
|
|
|
|
# chosen automatically, but it may be overridden here. E.g., A bucket size of 1.
|
|
|
|
# 5 results in buckets from 0 - 1.5, 1.5 - 3.0, etc. Cannot be negative. This
|
|
|
|
# field is optional.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `bucketSize`
|
|
|
|
# @return [Float]
|
|
|
|
attr_accessor :bucket_size
|
2017-06-02 06:11:31 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The position of the chart legend.
|
|
|
|
# Corresponds to the JSON property `legendPosition`
|
2017-07-12 20:10:42 +00:00
|
|
|
# @return [String]
|
2017-08-25 19:54:22 +00:00
|
|
|
attr_accessor :legend_position
|
2017-07-12 20:10:42 +00:00
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The outlier percentile is used to ensure that outliers do not adversely affect
|
|
|
|
# the calculation of bucket sizes. For example, setting an outlier percentile of
|
|
|
|
# 0.05 indicates that the top and bottom 5% of values when calculating buckets.
|
|
|
|
# The values are still included in the chart, they will be added to the first or
|
|
|
|
# last buckets instead of their own buckets. Must be between 0.0 and 0.5.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `outlierPercentile`
|
|
|
|
# @return [Float]
|
|
|
|
attr_accessor :outlier_percentile
|
|
|
|
|
|
|
|
# The series for a histogram may be either a single series of values to be
|
2020-08-18 00:38:22 +00:00
|
|
|
# bucketed or multiple series, each of the same length, containing the name of
|
|
|
|
# the series followed by the values to be bucketed for that series.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `series`
|
|
|
|
# @return [Array<Google::Apis::SheetsV4::HistogramSeries>]
|
|
|
|
attr_accessor :series
|
|
|
|
|
|
|
|
# Whether horizontal divider lines should be displayed between items in each
|
|
|
|
# column.
|
|
|
|
# Corresponds to the JSON property `showItemDividers`
|
|
|
|
# @return [Boolean]
|
|
|
|
attr_accessor :show_item_dividers
|
|
|
|
alias_method :show_item_dividers?, :show_item_dividers
|
2017-06-02 06:11:31 +00:00
|
|
|
|
2017-03-31 19:53:27 +00:00
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@bucket_size = args[:bucket_size] if args.key?(:bucket_size)
|
|
|
|
@legend_position = args[:legend_position] if args.key?(:legend_position)
|
|
|
|
@outlier_percentile = args[:outlier_percentile] if args.key?(:outlier_percentile)
|
|
|
|
@series = args[:series] if args.key?(:series)
|
|
|
|
@show_item_dividers = args[:show_item_dividers] if args.key?(:show_item_dividers)
|
2017-01-20 23:27:22 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# Allows you to organize the numeric values in a source data column into buckets
|
|
|
|
# of a constant size. All values from HistogramRule.start to HistogramRule.end
|
|
|
|
# are placed into groups of size HistogramRule.interval. In addition, all values
|
|
|
|
# below HistogramRule.start are placed in one group, and all values above
|
|
|
|
# HistogramRule.end are placed in another. Only HistogramRule.interval is
|
|
|
|
# required, though if HistogramRule.start and HistogramRule.end are both
|
|
|
|
# provided, HistogramRule.start must be less than HistogramRule.end. For example,
|
|
|
|
# a pivot table showing average purchase amount by age that has 50+ rows: +-----
|
|
|
|
# +-------------------+ | Age | AVERAGE of Amount | +-----+-------------------+ |
|
|
|
|
# 16 | $27.13 | | 17 | $5.24 | | 18 | $20.15 | ... +-----+-------------------+
|
|
|
|
# could be turned into a pivot table that looks like the one below by applying a
|
|
|
|
# histogram group rule with a HistogramRule.start of 25, an HistogramRule.
|
|
|
|
# interval of 20, and an HistogramRule.end of 65. +-------------+----------------
|
|
|
|
# ---+ | Grouped Age | AVERAGE of Amount | +-------------+-------------------+ |
|
|
|
|
# < 25 | $19.34 | | 25-45 | $31.43 | | 45-65 | $35.87 | | > 65 | $27.55 | +------
|
|
|
|
# -------+-------------------+ | Grand Total | $29.12 | +-------------+----------
|
|
|
|
# ---------+
|
2018-01-30 00:35:59 +00:00
|
|
|
class HistogramRule
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The maximum value at which items are placed into buckets of constant size.
|
|
|
|
# Values above end are lumped into a single bucket. This field is optional.
|
2018-01-30 00:35:59 +00:00
|
|
|
# Corresponds to the JSON property `end`
|
|
|
|
# @return [Float]
|
|
|
|
attr_accessor :end
|
|
|
|
|
2018-05-23 00:36:42 +00:00
|
|
|
# The size of the buckets that are created. Must be positive.
|
2018-01-30 00:35:59 +00:00
|
|
|
# Corresponds to the JSON property `interval`
|
|
|
|
# @return [Float]
|
|
|
|
attr_accessor :interval
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The minimum value at which items are placed into buckets of constant size.
|
|
|
|
# Values below start are lumped into a single bucket. This field is optional.
|
2018-01-30 00:35:59 +00:00
|
|
|
# Corresponds to the JSON property `start`
|
|
|
|
# @return [Float]
|
|
|
|
attr_accessor :start
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@end = args[:end] if args.key?(:end)
|
|
|
|
@interval = args[:interval] if args.key?(:interval)
|
|
|
|
@start = args[:start] if args.key?(:start)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# A histogram series containing the series color and data.
|
|
|
|
class HistogramSeries
|
2017-01-20 23:27:22 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Represents a color in the RGBA color space. This representation is designed
|
|
|
|
# for simplicity of conversion to/from color representations in various
|
2020-08-18 00:38:22 +00:00
|
|
|
# languages over compactness; for example, the fields of this representation can
|
|
|
|
# be trivially provided to the constructor of "java.awt.Color" in Java; it can
|
|
|
|
# also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
|
|
|
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
|
|
|
# CSS "rgba()" string in JavaScript, as well. Note: this proto does not carry
|
|
|
|
# information about the absolute color space that should be used to interpret
|
|
|
|
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
|
|
|
# applications SHOULD assume the sRGB color space. Note: when color equality
|
|
|
|
# needs to be decided, implementations, unless documented otherwise, will treat
|
|
|
|
# two colors to be equal if all their red, green, blue and alpha values each
|
|
|
|
# differ by at most 1e-5. 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(''); `; // ...
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `barColor`
|
|
|
|
# @return [Google::Apis::SheetsV4::Color]
|
|
|
|
attr_accessor :bar_color
|
2017-06-14 17:02:03 +00:00
|
|
|
|
2020-01-25 00:37:19 +00:00
|
|
|
# A color value.
|
|
|
|
# Corresponds to the JSON property `barColorStyle`
|
|
|
|
# @return [Google::Apis::SheetsV4::ColorStyle]
|
|
|
|
attr_accessor :bar_color_style
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The data included in a domain or series.
|
|
|
|
# Corresponds to the JSON property `data`
|
|
|
|
# @return [Google::Apis::SheetsV4::ChartData]
|
|
|
|
attr_accessor :data
|
2017-06-14 17:02:03 +00:00
|
|
|
|
2017-07-12 20:10:42 +00:00
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
2017-06-14 17:02:03 +00:00
|
|
|
|
2017-07-12 20:10:42 +00:00
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@bar_color = args[:bar_color] if args.key?(:bar_color)
|
2020-01-25 00:37:19 +00:00
|
|
|
@bar_color_style = args[:bar_color_style] if args.key?(:bar_color_style)
|
2017-08-25 19:54:22 +00:00
|
|
|
@data = args[:data] if args.key?(:data)
|
2017-07-12 20:10:42 +00:00
|
|
|
end
|
|
|
|
end
|
2017-05-04 19:35:56 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Inserts rows or columns in a sheet at a particular index.
|
|
|
|
class InsertDimensionRequest
|
2017-07-12 20:10:42 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# 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
|
2017-08-25 19:54:22 +00:00
|
|
|
# be green (because the row after the insertion point was green).
|
|
|
|
# Corresponds to the JSON property `inheritFromBefore`
|
|
|
|
# @return [Boolean]
|
|
|
|
attr_accessor :inherit_from_before
|
|
|
|
alias_method :inherit_from_before?, :inherit_from_before
|
2017-07-12 20:10:42 +00:00
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# A range along a single dimension on a sheet. All indexes are zero-based.
|
|
|
|
# Indexes are half open: the start index is inclusive and the end index is
|
|
|
|
# exclusive. Missing indexes indicate the range is unbounded on that side.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `range`
|
|
|
|
# @return [Google::Apis::SheetsV4::DimensionRange]
|
|
|
|
attr_accessor :range
|
2017-07-12 20:10:42 +00:00
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@inherit_from_before = args[:inherit_from_before] if args.key?(:inherit_from_before)
|
|
|
|
@range = args[:range] if args.key?(:range)
|
2017-07-12 20:10:42 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Inserts cells into a range, shifting the existing cells over or down.
|
|
|
|
class InsertRangeRequest
|
2017-07-12 20:10:42 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# A range on a sheet. All indexes are zero-based. Indexes are half open, i.e.
|
|
|
|
# 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 sheet 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!`.
|
2017-07-12 20:10:42 +00:00
|
|
|
# Corresponds to the JSON property `range`
|
|
|
|
# @return [Google::Apis::SheetsV4::GridRange]
|
|
|
|
attr_accessor :range
|
2017-06-14 17:02:03 +00:00
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The dimension which will be shifted when inserting cells. If ROWS, existing
|
|
|
|
# cells will be shifted down. If COLUMNS, existing cells will be shifted right.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `shiftDimension`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :shift_dimension
|
2017-03-30 22:30:51 +00:00
|
|
|
|
2017-01-28 03:38:40 +00:00
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-07-12 20:10:42 +00:00
|
|
|
@range = args[:range] if args.key?(:range)
|
2017-08-25 19:54:22 +00:00
|
|
|
@shift_dimension = args[:shift_dimension] if args.key?(:shift_dimension)
|
2017-01-28 03:38:40 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# A single interpolation point on a gradient conditional format. These pin the
|
|
|
|
# gradient color scale according to the color, type and value chosen.
|
2017-08-25 19:54:22 +00:00
|
|
|
class InterpolationPoint
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
|
|
|
# Represents a color in the RGBA color space. This representation is designed
|
|
|
|
# for simplicity of conversion to/from color representations in various
|
2020-08-18 00:38:22 +00:00
|
|
|
# languages over compactness; for example, the fields of this representation can
|
|
|
|
# be trivially provided to the constructor of "java.awt.Color" in Java; it can
|
|
|
|
# also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
|
|
|
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
|
|
|
# CSS "rgba()" string in JavaScript, as well. Note: this proto does not carry
|
|
|
|
# information about the absolute color space that should be used to interpret
|
|
|
|
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
|
|
|
# applications SHOULD assume the sRGB color space. Note: when color equality
|
|
|
|
# needs to be decided, implementations, unless documented otherwise, will treat
|
|
|
|
# two colors to be equal if all their red, green, blue and alpha values each
|
|
|
|
# differ by at most 1e-5. 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(''); `; // ...
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `color`
|
|
|
|
# @return [Google::Apis::SheetsV4::Color]
|
|
|
|
attr_accessor :color
|
|
|
|
|
2020-02-05 00:37:38 +00:00
|
|
|
# A color value.
|
|
|
|
# Corresponds to the JSON property `colorStyle`
|
|
|
|
# @return [Google::Apis::SheetsV4::ColorStyle]
|
|
|
|
attr_accessor :color_style
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# How the value should be interpreted.
|
|
|
|
# Corresponds to the JSON property `type`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :type
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The value this interpolation point uses. May be a formula. Unused if type is
|
|
|
|
# MIN or MAX.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `value`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :value
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@color = args[:color] if args.key?(:color)
|
2020-02-05 00:37:38 +00:00
|
|
|
@color_style = args[:color_style] if args.key?(:color_style)
|
2017-08-25 19:54:22 +00:00
|
|
|
@type = args[:type] if args.key?(:type)
|
|
|
|
@value = args[:value] if args.key?(:value)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2020-08-28 00:38:58 +00:00
|
|
|
# Represents a time interval, encoded as a Timestamp start (inclusive) and a
|
|
|
|
# Timestamp end (exclusive). The start must be less than or equal to the end.
|
|
|
|
# When the start equals the end, the interval is empty (matches no time). When
|
|
|
|
# both start and end are unspecified, the interval matches any time.
|
|
|
|
class Interval
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
|
|
|
# Optional. Exclusive end of the interval. If specified, a Timestamp matching
|
|
|
|
# this interval will have to be before the end.
|
|
|
|
# Corresponds to the JSON property `endTime`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :end_time
|
|
|
|
|
|
|
|
# Optional. Inclusive start of the interval. If specified, a Timestamp matching
|
|
|
|
# this interval will have to be the same or after the start.
|
|
|
|
# Corresponds to the JSON property `startTime`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :start_time
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@end_time = args[:end_time] if args.key?(:end_time)
|
|
|
|
@start_time = args[:start_time] if args.key?(:start_time)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Settings to control how circular dependencies are resolved with iterative
|
|
|
|
# calculation.
|
|
|
|
class IterativeCalculationSettings
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# When iterative calculation is enabled and successive results differ by less
|
|
|
|
# than this threshold value, the calculation rounds stop.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `convergenceThreshold`
|
|
|
|
# @return [Float]
|
|
|
|
attr_accessor :convergence_threshold
|
|
|
|
|
|
|
|
# When iterative calculation is enabled, the maximum number of calculation
|
|
|
|
# rounds to perform.
|
|
|
|
# Corresponds to the JSON property `maxIterations`
|
|
|
|
# @return [Fixnum]
|
|
|
|
attr_accessor :max_iterations
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@convergence_threshold = args[:convergence_threshold] if args.key?(:convergence_threshold)
|
|
|
|
@max_iterations = args[:max_iterations] if args.key?(:max_iterations)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2019-10-09 00:37:55 +00:00
|
|
|
# Formatting options for key value.
|
|
|
|
class KeyValueFormat
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
|
|
|
# Position settings for text.
|
|
|
|
# Corresponds to the JSON property `position`
|
|
|
|
# @return [Google::Apis::SheetsV4::TextPosition]
|
|
|
|
attr_accessor :position
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The format of a run of text in a cell. Absent values indicate that the field
|
|
|
|
# isn't specified.
|
2019-10-09 00:37:55 +00:00
|
|
|
# Corresponds to the JSON property `textFormat`
|
|
|
|
# @return [Google::Apis::SheetsV4::TextFormat]
|
|
|
|
attr_accessor :text_format
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@position = args[:position] if args.key?(:position)
|
|
|
|
@text_format = args[:text_format] if args.key?(:text_format)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-12-19 00:35:20 +00:00
|
|
|
# Properties that describe the style of a line.
|
|
|
|
class LineStyle
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
|
|
|
# The dash type of the line.
|
|
|
|
# Corresponds to the JSON property `type`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :type
|
|
|
|
|
|
|
|
# The thickness of the line, in px.
|
|
|
|
# Corresponds to the JSON property `width`
|
|
|
|
# @return [Fixnum]
|
|
|
|
attr_accessor :width
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@type = args[:type] if args.key?(:type)
|
|
|
|
@width = args[:width] if args.key?(:width)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2018-01-30 00:35:59 +00:00
|
|
|
# Allows you to manually organize the values in a source data column into
|
|
|
|
# buckets with names of your choosing. For example, a pivot table that
|
2020-08-18 00:38:22 +00:00
|
|
|
# aggregates population by state: +-------+-------------------+ | State | SUM of
|
|
|
|
# Population | +-------+-------------------+ | AK | 0.7 | | AL | 4.8 | | AR | 2.
|
|
|
|
# 9 | ... +-------+-------------------+ could be turned into a pivot table that
|
|
|
|
# aggregates population by time zone by providing a list of groups (for example,
|
|
|
|
# groupName = 'Central', items = ['AL', 'AR', 'IA', ...]) to a manual group rule.
|
|
|
|
# Note that a similar effect could be achieved by adding a time zone column to
|
|
|
|
# the source data and adjusting the pivot table. +-----------+-------------------
|
|
|
|
# + | Time Zone | SUM of Population | +-----------+-------------------+ |
|
|
|
|
# Central | 106.3 | | Eastern | 151.9 | | Mountain | 17.4 | ... +-----------+----
|
|
|
|
# ---------------+
|
2018-01-30 00:35:59 +00:00
|
|
|
class ManualRule
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The list of group names and the corresponding items from the source data that
|
|
|
|
# map to each group name.
|
2018-01-30 00:35:59 +00:00
|
|
|
# Corresponds to the JSON property `groups`
|
|
|
|
# @return [Array<Google::Apis::SheetsV4::ManualRuleGroup>]
|
|
|
|
attr_accessor :groups
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@groups = args[:groups] if args.key?(:groups)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# A group name and a list of items from the source data that should be placed in
|
|
|
|
# the group with this name.
|
2018-01-30 00:35:59 +00:00
|
|
|
class ManualRuleGroup
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
|
|
|
# The kinds of value that a cell in a spreadsheet can have.
|
|
|
|
# Corresponds to the JSON property `groupName`
|
|
|
|
# @return [Google::Apis::SheetsV4::ExtendedValue]
|
|
|
|
attr_accessor :group_name
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The items in the source data that should be placed into this group. Each item
|
|
|
|
# may be a string, number, or boolean. Items may appear in at most one group
|
|
|
|
# within a given ManualRule. Items that do not appear in any group will appear
|
|
|
|
# on their own.
|
2018-01-30 00:35:59 +00:00
|
|
|
# Corresponds to the JSON property `items`
|
|
|
|
# @return [Array<Google::Apis::SheetsV4::ExtendedValue>]
|
|
|
|
attr_accessor :items
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@group_name = args[:group_name] if args.key?(:group_name)
|
|
|
|
@items = args[:items] if args.key?(:items)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-09-20 00:35:54 +00:00
|
|
|
# A developer metadata entry and the data filters specified in the original
|
|
|
|
# request that matched it.
|
|
|
|
class MatchedDeveloperMetadata
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
|
|
|
# All filters matching the returned developer metadata.
|
|
|
|
# Corresponds to the JSON property `dataFilters`
|
|
|
|
# @return [Array<Google::Apis::SheetsV4::DataFilter>]
|
|
|
|
attr_accessor :data_filters
|
|
|
|
|
|
|
|
# Developer metadata associated with a location or object in a spreadsheet.
|
2020-08-18 00:38:22 +00:00
|
|
|
# Developer metadata may be used to associate arbitrary data with various parts
|
|
|
|
# of a spreadsheet and will remain associated at those locations as they move
|
|
|
|
# around and the spreadsheet is edited. For example, if developer metadata is
|
|
|
|
# associated with row 5 and another row is then subsequently inserted above row
|
|
|
|
# 5, that original metadata will still be associated with the row it was first
|
|
|
|
# associated with (what is now row 6). If the associated object is deleted its
|
|
|
|
# metadata is deleted too.
|
2017-09-20 00:35:54 +00:00
|
|
|
# Corresponds to the JSON property `developerMetadata`
|
|
|
|
# @return [Google::Apis::SheetsV4::DeveloperMetadata]
|
|
|
|
attr_accessor :developer_metadata
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@data_filters = args[:data_filters] if args.key?(:data_filters)
|
|
|
|
@developer_metadata = args[:developer_metadata] if args.key?(:developer_metadata)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
# A value range that was matched by one or more data filers.
|
|
|
|
class MatchedValueRange
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The DataFilters from the request that matched the range of values.
|
2017-09-20 00:35:54 +00:00
|
|
|
# Corresponds to the JSON property `dataFilters`
|
|
|
|
# @return [Array<Google::Apis::SheetsV4::DataFilter>]
|
|
|
|
attr_accessor :data_filters
|
|
|
|
|
|
|
|
# Data within a range of the spreadsheet.
|
|
|
|
# Corresponds to the JSON property `valueRange`
|
|
|
|
# @return [Google::Apis::SheetsV4::ValueRange]
|
|
|
|
attr_accessor :value_range
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@data_filters = args[:data_filters] if args.key?(:data_filters)
|
|
|
|
@value_range = args[:value_range] if args.key?(:value_range)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Merges all cells in the range.
|
|
|
|
class MergeCellsRequest
|
2017-01-28 03:38:40 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2017-07-12 20:10:42 +00:00
|
|
|
# How the cells should be merged.
|
|
|
|
# Corresponds to the JSON property `mergeType`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :merge_type
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# A range on a sheet. All indexes are zero-based. Indexes are half open, i.e.
|
|
|
|
# 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 sheet 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!`.
|
2017-07-12 20:10:42 +00:00
|
|
|
# Corresponds to the JSON property `range`
|
|
|
|
# @return [Google::Apis::SheetsV4::GridRange]
|
|
|
|
attr_accessor :range
|
2017-04-03 20:18:48 +00:00
|
|
|
|
2017-05-26 16:44:32 +00:00
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
2017-05-04 19:35:56 +00:00
|
|
|
|
2017-05-26 16:44:32 +00:00
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-07-12 20:10:42 +00:00
|
|
|
@merge_type = args[:merge_type] if args.key?(:merge_type)
|
|
|
|
@range = args[:range] if args.key?(:range)
|
2017-05-26 16:44:32 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Moves one or more rows or columns.
|
|
|
|
class MoveDimensionRequest
|
2017-05-26 16:44:32 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The zero-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 zero-based index of row 5). The end result would be `A1..A5` of `
|
|
|
|
# 0, 3, 1, 2, 4`.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `destinationIndex`
|
|
|
|
# @return [Fixnum]
|
|
|
|
attr_accessor :destination_index
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# A range along a single dimension on a sheet. All indexes are zero-based.
|
|
|
|
# Indexes are half open: the start index is inclusive and the end index is
|
|
|
|
# exclusive. Missing indexes indicate the range is unbounded on that side.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `source`
|
|
|
|
# @return [Google::Apis::SheetsV4::DimensionRange]
|
|
|
|
attr_accessor :source
|
2017-03-10 21:11:09 +00:00
|
|
|
|
2017-03-27 22:14:47 +00:00
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
2017-03-10 21:11:09 +00:00
|
|
|
|
2017-04-03 20:18:48 +00:00
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@destination_index = args[:destination_index] if args.key?(:destination_index)
|
|
|
|
@source = args[:source] if args.key?(:source)
|
2017-04-03 20:18:48 +00:00
|
|
|
end
|
|
|
|
end
|
2016-05-16 16:49:15 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# A named range.
|
|
|
|
class NamedRange
|
2017-04-03 20:18:48 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
2017-03-27 22:14:47 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The name of the named range.
|
|
|
|
# Corresponds to the JSON property `name`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :name
|
|
|
|
|
|
|
|
# The ID of the named range.
|
|
|
|
# Corresponds to the JSON property `namedRangeId`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :named_range_id
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# A range on a sheet. All indexes are zero-based. Indexes are half open, i.e.
|
|
|
|
# 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 sheet 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!`.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `range`
|
|
|
|
# @return [Google::Apis::SheetsV4::GridRange]
|
|
|
|
attr_accessor :range
|
2017-06-02 06:11:31 +00:00
|
|
|
|
2017-03-27 22:14:47 +00:00
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@name = args[:name] if args.key?(:name)
|
|
|
|
@named_range_id = args[:named_range_id] if args.key?(:named_range_id)
|
|
|
|
@range = args[:range] if args.key?(:range)
|
2017-03-27 22:14:47 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The number format of a cell.
|
|
|
|
class NumberFormat
|
2017-03-27 22:14:47 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# Pattern string used for formatting. If not set, a default pattern based on the
|
|
|
|
# user's locale will be used if necessary for the given type. See the [Date and
|
|
|
|
# Number Formats guide](/sheets/api/guides/formats) for more information about
|
|
|
|
# the supported patterns.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `pattern`
|
2017-07-12 20:10:42 +00:00
|
|
|
# @return [String]
|
2017-08-25 19:54:22 +00:00
|
|
|
attr_accessor :pattern
|
2017-07-12 20:10:42 +00:00
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The type of the number format. When writing, this field must be set.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `type`
|
2017-07-12 20:10:42 +00:00
|
|
|
# @return [String]
|
2017-08-25 19:54:22 +00:00
|
|
|
attr_accessor :type
|
2017-06-14 17:02:03 +00:00
|
|
|
|
2016-11-08 23:43:14 +00:00
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@pattern = args[:pattern] if args.key?(:pattern)
|
|
|
|
@type = args[:type] if args.key?(:type)
|
2017-04-03 20:18:48 +00:00
|
|
|
end
|
|
|
|
end
|
2017-03-31 19:53:27 +00:00
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# An org chart. Org charts require a unique set of labels in labels and may
|
|
|
|
# optionally include parent_labels and tooltips. parent_labels contain, for each
|
|
|
|
# node, the label identifying the parent node. tooltips contain, for each node,
|
|
|
|
# an optional tooltip. For example, to describe an OrgChart with Alice as the
|
|
|
|
# CEO, Bob as the President (reporting to Alice) and Cathy as VP of Sales (also
|
|
|
|
# reporting to Alice), have labels contain "Alice", "Bob", "Cathy",
|
|
|
|
# parent_labels contain "", "Alice", "Alice" and tooltips contain "CEO", "
|
|
|
|
# President", "VP Sales".
|
2017-08-25 19:54:22 +00:00
|
|
|
class OrgChartSpec
|
2017-04-03 20:18:48 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
2017-03-31 19:53:27 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The data included in a domain or series.
|
|
|
|
# Corresponds to the JSON property `labels`
|
|
|
|
# @return [Google::Apis::SheetsV4::ChartData]
|
|
|
|
attr_accessor :labels
|
2017-07-12 20:10:42 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Represents a color in the RGBA color space. This representation is designed
|
|
|
|
# for simplicity of conversion to/from color representations in various
|
2020-08-18 00:38:22 +00:00
|
|
|
# languages over compactness; for example, the fields of this representation can
|
|
|
|
# be trivially provided to the constructor of "java.awt.Color" in Java; it can
|
|
|
|
# also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
|
|
|
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
|
|
|
# CSS "rgba()" string in JavaScript, as well. Note: this proto does not carry
|
|
|
|
# information about the absolute color space that should be used to interpret
|
|
|
|
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
|
|
|
# applications SHOULD assume the sRGB color space. Note: when color equality
|
|
|
|
# needs to be decided, implementations, unless documented otherwise, will treat
|
|
|
|
# two colors to be equal if all their red, green, blue and alpha values each
|
|
|
|
# differ by at most 1e-5. 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(''); `; // ...
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `nodeColor`
|
|
|
|
# @return [Google::Apis::SheetsV4::Color]
|
|
|
|
attr_accessor :node_color
|
2017-07-12 20:10:42 +00:00
|
|
|
|
2020-01-25 00:37:19 +00:00
|
|
|
# A color value.
|
|
|
|
# Corresponds to the JSON property `nodeColorStyle`
|
|
|
|
# @return [Google::Apis::SheetsV4::ColorStyle]
|
|
|
|
attr_accessor :node_color_style
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The size of the org chart nodes.
|
|
|
|
# Corresponds to the JSON property `nodeSize`
|
2017-07-12 20:10:42 +00:00
|
|
|
# @return [String]
|
2017-08-25 19:54:22 +00:00
|
|
|
attr_accessor :node_size
|
2017-03-31 19:53:27 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The data included in a domain or series.
|
|
|
|
# Corresponds to the JSON property `parentLabels`
|
|
|
|
# @return [Google::Apis::SheetsV4::ChartData]
|
|
|
|
attr_accessor :parent_labels
|
2017-06-14 17:02:03 +00:00
|
|
|
|
2017-07-12 20:10:42 +00:00
|
|
|
# Represents a color in the RGBA color space. This representation is designed
|
|
|
|
# for simplicity of conversion to/from color representations in various
|
2020-08-18 00:38:22 +00:00
|
|
|
# languages over compactness; for example, the fields of this representation can
|
|
|
|
# be trivially provided to the constructor of "java.awt.Color" in Java; it can
|
|
|
|
# also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
|
|
|
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
|
|
|
# CSS "rgba()" string in JavaScript, as well. Note: this proto does not carry
|
|
|
|
# information about the absolute color space that should be used to interpret
|
|
|
|
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
|
|
|
# applications SHOULD assume the sRGB color space. Note: when color equality
|
|
|
|
# needs to be decided, implementations, unless documented otherwise, will treat
|
|
|
|
# two colors to be equal if all their red, green, blue and alpha values each
|
|
|
|
# differ by at most 1e-5. 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(''); `; // ...
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `selectedNodeColor`
|
2017-07-12 20:10:42 +00:00
|
|
|
# @return [Google::Apis::SheetsV4::Color]
|
2017-08-25 19:54:22 +00:00
|
|
|
attr_accessor :selected_node_color
|
2017-07-12 20:10:42 +00:00
|
|
|
|
2020-01-25 00:37:19 +00:00
|
|
|
# A color value.
|
|
|
|
# Corresponds to the JSON property `selectedNodeColorStyle`
|
|
|
|
# @return [Google::Apis::SheetsV4::ColorStyle]
|
|
|
|
attr_accessor :selected_node_color_style
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The data included in a domain or series.
|
|
|
|
# Corresponds to the JSON property `tooltips`
|
|
|
|
# @return [Google::Apis::SheetsV4::ChartData]
|
|
|
|
attr_accessor :tooltips
|
2017-03-31 19:53:27 +00:00
|
|
|
|
2017-04-03 20:18:48 +00:00
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@labels = args[:labels] if args.key?(:labels)
|
|
|
|
@node_color = args[:node_color] if args.key?(:node_color)
|
2020-01-25 00:37:19 +00:00
|
|
|
@node_color_style = args[:node_color_style] if args.key?(:node_color_style)
|
2017-08-25 19:54:22 +00:00
|
|
|
@node_size = args[:node_size] if args.key?(:node_size)
|
|
|
|
@parent_labels = args[:parent_labels] if args.key?(:parent_labels)
|
|
|
|
@selected_node_color = args[:selected_node_color] if args.key?(:selected_node_color)
|
2020-01-25 00:37:19 +00:00
|
|
|
@selected_node_color_style = args[:selected_node_color_style] if args.key?(:selected_node_color_style)
|
2017-08-25 19:54:22 +00:00
|
|
|
@tooltips = args[:tooltips] if args.key?(:tooltips)
|
2017-04-03 20:18:48 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The location an object is overlaid on top of a grid.
|
|
|
|
class OverlayPosition
|
2017-04-03 20:18:48 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# A coordinate in a sheet. All indexes are zero-based.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `anchorCell`
|
|
|
|
# @return [Google::Apis::SheetsV4::GridCoordinate]
|
|
|
|
attr_accessor :anchor_cell
|
2017-06-14 17:02:03 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The height of the object, in pixels. Defaults to 371.
|
|
|
|
# Corresponds to the JSON property `heightPixels`
|
|
|
|
# @return [Fixnum]
|
|
|
|
attr_accessor :height_pixels
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The horizontal offset, in pixels, that the object is offset from the anchor
|
|
|
|
# cell.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `offsetXPixels`
|
|
|
|
# @return [Fixnum]
|
|
|
|
attr_accessor :offset_x_pixels
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The vertical offset, in pixels, that the object is offset from the anchor cell.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `offsetYPixels`
|
|
|
|
# @return [Fixnum]
|
|
|
|
attr_accessor :offset_y_pixels
|
|
|
|
|
|
|
|
# The width of the object, in pixels. Defaults to 600.
|
|
|
|
# Corresponds to the JSON property `widthPixels`
|
|
|
|
# @return [Fixnum]
|
|
|
|
attr_accessor :width_pixels
|
2017-03-31 19:53:27 +00:00
|
|
|
|
2017-05-26 16:44:32 +00:00
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
2017-03-31 19:53:27 +00:00
|
|
|
|
2017-05-26 16:44:32 +00:00
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@anchor_cell = args[:anchor_cell] if args.key?(:anchor_cell)
|
|
|
|
@height_pixels = args[:height_pixels] if args.key?(:height_pixels)
|
|
|
|
@offset_x_pixels = args[:offset_x_pixels] if args.key?(:offset_x_pixels)
|
|
|
|
@offset_y_pixels = args[:offset_y_pixels] if args.key?(:offset_y_pixels)
|
|
|
|
@width_pixels = args[:width_pixels] if args.key?(:width_pixels)
|
2017-05-26 16:44:32 +00:00
|
|
|
end
|
|
|
|
end
|
2017-03-31 19:53:27 +00:00
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The amount of padding around the cell, in pixels. When updating padding, every
|
|
|
|
# field must be specified.
|
2017-08-25 19:54:22 +00:00
|
|
|
class Padding
|
2017-05-26 16:44:32 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
2017-03-30 22:30:51 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The bottom padding of the cell.
|
|
|
|
# Corresponds to the JSON property `bottom`
|
|
|
|
# @return [Fixnum]
|
|
|
|
attr_accessor :bottom
|
2017-06-14 17:02:03 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# 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
|
2017-05-26 16:44:32 +00:00
|
|
|
|
2017-05-04 19:35:56 +00:00
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
2017-04-03 20:18:48 +00:00
|
|
|
|
2017-05-04 19:35:56 +00:00
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@bottom = args[:bottom] if args.key?(:bottom)
|
|
|
|
@left = args[:left] if args.key?(:left)
|
|
|
|
@right = args[:right] if args.key?(:right)
|
|
|
|
@top = args[:top] if args.key?(:top)
|
2017-05-04 19:35:56 +00:00
|
|
|
end
|
|
|
|
end
|
2017-03-31 19:53:27 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Inserts data into the spreadsheet starting at the specified coordinate.
|
|
|
|
class PasteDataRequest
|
2017-07-12 20:10:42 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# A coordinate in a sheet. All indexes are zero-based.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `coordinate`
|
|
|
|
# @return [Google::Apis::SheetsV4::GridCoordinate]
|
|
|
|
attr_accessor :coordinate
|
2017-06-02 06:11:31 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The data to insert.
|
|
|
|
# Corresponds to the JSON property `data`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :data
|
2017-07-12 20:10:42 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The delimiter in the data.
|
|
|
|
# Corresponds to the JSON property `delimiter`
|
2017-05-26 16:44:32 +00:00
|
|
|
# @return [String]
|
2017-08-25 19:54:22 +00:00
|
|
|
attr_accessor :delimiter
|
2017-06-14 17:02:03 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# True if the data is HTML.
|
|
|
|
# Corresponds to the JSON property `html`
|
|
|
|
# @return [Boolean]
|
|
|
|
attr_accessor :html
|
|
|
|
alias_method :html?, :html
|
2017-07-12 20:10:42 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# How the data should be pasted.
|
|
|
|
# Corresponds to the JSON property `type`
|
2017-06-14 17:02:03 +00:00
|
|
|
# @return [String]
|
2017-08-25 19:54:22 +00:00
|
|
|
attr_accessor :type
|
2017-05-26 16:44:32 +00:00
|
|
|
|
2017-05-04 19:35:56 +00:00
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
2017-04-03 20:18:48 +00:00
|
|
|
|
2017-05-04 19:35:56 +00:00
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@coordinate = args[:coordinate] if args.key?(:coordinate)
|
|
|
|
@data = args[:data] if args.key?(:data)
|
|
|
|
@delimiter = args[:delimiter] if args.key?(:delimiter)
|
|
|
|
@html = args[:html] if args.key?(:html)
|
|
|
|
@type = args[:type] if args.key?(:type)
|
2017-05-04 19:35:56 +00:00
|
|
|
end
|
|
|
|
end
|
2017-03-30 22:30:51 +00:00
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# A pie chart.
|
2017-08-25 19:54:22 +00:00
|
|
|
class PieChartSpec
|
2017-05-04 19:35:56 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The data included in a domain or series.
|
|
|
|
# Corresponds to the JSON property `domain`
|
|
|
|
# @return [Google::Apis::SheetsV4::ChartData]
|
|
|
|
attr_accessor :domain
|
2017-07-12 20:10:42 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Where the legend of the pie chart should be drawn.
|
|
|
|
# Corresponds to the JSON property `legendPosition`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :legend_position
|
2017-07-12 20:10:42 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The size of the hole in the pie chart.
|
|
|
|
# Corresponds to the JSON property `pieHole`
|
|
|
|
# @return [Float]
|
|
|
|
attr_accessor :pie_hole
|
|
|
|
|
|
|
|
# The data included in a domain or series.
|
|
|
|
# Corresponds to the JSON property `series`
|
|
|
|
# @return [Google::Apis::SheetsV4::ChartData]
|
|
|
|
attr_accessor :series
|
|
|
|
|
|
|
|
# True if the pie is three dimensional.
|
|
|
|
# Corresponds to the JSON property `threeDimensional`
|
|
|
|
# @return [Boolean]
|
|
|
|
attr_accessor :three_dimensional
|
|
|
|
alias_method :three_dimensional?, :three_dimensional
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@domain = args[:domain] if args.key?(:domain)
|
|
|
|
@legend_position = args[:legend_position] if args.key?(:legend_position)
|
|
|
|
@pie_hole = args[:pie_hole] if args.key?(:pie_hole)
|
|
|
|
@series = args[:series] if args.key?(:series)
|
|
|
|
@three_dimensional = args[:three_dimensional] if args.key?(:three_dimensional)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
# Criteria for showing/hiding rows in a pivot table.
|
|
|
|
class PivotFilterCriteria
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
feat: Automated regeneration of sheets v4 client (#1404)
This PR was generated using Autosynth. :rainbow:
<details><summary>Log from Synthtool</summary>
```
2020-11-05 03:15:23,076 synthtool [DEBUG] > Executing /home/kbuilder/.cache/synthtool/google-api-ruby-client/synth.py.
On branch autosynth-sheets-v4
nothing to commit, working tree clean
2020-11-05 03:15:23,105 synthtool [DEBUG] > Running: docker run --rm -v/home/kbuilder/.cache/synthtool/google-api-ruby-client:/workspace -v/var/run/docker.sock:/var/run/docker.sock -w /workspace --entrypoint script/synth.rb gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/autosynth sheets v4
DEBUG:synthtool:Running: docker run --rm -v/home/kbuilder/.cache/synthtool/google-api-ruby-client:/workspace -v/var/run/docker.sock:/var/run/docker.sock -w /workspace --entrypoint script/synth.rb gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/autosynth sheets v4
bundle install
Don't run Bundler as root. Bundler can ask for sudo if it is needed, and
installing your bundle as root will break this application for all non-root
users on this machine.
The dependency jruby-openssl (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for java. To add those platforms to the bundle, run `bundle lock --add-platform java`.
Fetching gem metadata from https://rubygems.org/.........
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies...
Fetching rake 11.3.0
Installing rake 11.3.0
Fetching concurrent-ruby 1.1.7
Installing concurrent-ruby 1.1.7
Fetching i18n 1.8.5
Installing i18n 1.8.5
Fetching minitest 5.14.2
Installing minitest 5.14.2
Fetching thread_safe 0.3.6
Installing thread_safe 0.3.6
Fetching tzinfo 1.2.7
Installing tzinfo 1.2.7
Fetching activesupport 5.0.7.2
Installing activesupport 5.0.7.2
Fetching public_suffix 4.0.6
Installing public_suffix 4.0.6
Fetching addressable 2.7.0
Installing addressable 2.7.0
Fetching ast 2.4.1
Installing ast 2.4.1
Using bundler 2.1.4
Fetching byebug 11.1.3
Installing byebug 11.1.3 with native extensions
Fetching coderay 1.1.3
Installing coderay 1.1.3
Fetching json 2.3.1
Installing json 2.3.1 with native extensions
Fetching docile 1.3.2
Installing docile 1.3.2
Fetching simplecov-html 0.10.2
Installing simplecov-html 0.10.2
Fetching simplecov 0.16.1
Installing simplecov 0.16.1
Using sync 0.5.0
Fetching tins 1.26.0
Installing tins 1.26.0
Fetching term-ansicolor 1.7.1
Installing term-ansicolor 1.7.1
Fetching thor 0.20.3
Installing thor 0.20.3
Fetching coveralls 0.8.23
Installing coveralls 0.8.23
Fetching crack 0.4.4
Installing crack 0.4.4
Fetching declarative 0.0.20
Installing declarative 0.0.20
Fetching declarative-option 0.1.0
Installing declarative-option 0.1.0
Fetching diff-lcs 1.4.4
Installing diff-lcs 1.4.4
Fetching dotenv 2.7.6
Installing dotenv 2.7.6
Fetching fakefs 0.20.1
Installing fakefs 0.20.1
Fetching multipart-post 2.1.1
Installing multipart-post 2.1.1
Fetching ruby2_keywords 0.0.2
Installing ruby2_keywords 0.0.2
Fetching faraday 1.1.0
Installing faraday 1.1.0
Fetching gems 1.2.0
Installing gems 1.2.0
Fetching github-markup 1.7.0
Installing github-markup 1.7.0
Fetching jwt 2.2.2
Installing jwt 2.2.2
Fetching memoist 0.16.2
Installing memoist 0.16.2
Fetching multi_json 1.15.0
Installing multi_json 1.15.0
Fetching os 0.9.6
Installing os 0.9.6
Fetching signet 0.14.0
Installing signet 0.14.0
Fetching googleauth 0.14.0
Installing googleauth 0.14.0
Fetching httpclient 2.8.3
Installing httpclient 2.8.3
Fetching mini_mime 1.0.2
Installing mini_mime 1.0.2
Fetching uber 0.1.0
Installing uber 0.1.0
Fetching representable 3.0.4
Installing representable 3.0.4
Fetching retriable 3.1.2
Installing retriable 3.1.2
Fetching rexml 3.2.4
Installing rexml 3.2.4
Using google-api-client 0.48.0 from source at `.`
Fetching google-id-token 1.4.2
Installing google-id-token 1.4.2
Fetching hashdiff 1.0.1
Installing hashdiff 1.0.1
Fetching mime-types-data 3.2020.1104
Installing mime-types-data 3.2020.1104
Fetching mime-types 3.3.1
Installing mime-types 3.3.1
Fetching multi_xml 0.6.0
Installing multi_xml 0.6.0
Fetching httparty 0.18.1
Installing httparty 0.18.1
Fetching rspec-support 3.10.0
Installing rspec-support 3.10.0
Fetching rspec-core 3.10.0
Installing rspec-core 3.10.0
Fetching rspec-expectations 3.10.0
Installing rspec-expectations 3.10.0
Fetching rspec-mocks 3.10.0
Installing rspec-mocks 3.10.0
Fetching rspec 3.10.0
Installing rspec 3.10.0
Fetching json_spec 1.1.5
Installing json_spec 1.1.5
Fetching launchy 2.5.0
Installing launchy 2.5.0
Fetching little-plugger 1.1.4
Installing little-plugger 1.1.4
Fetching logging 2.3.0
Installing logging 2.3.0
Fetching method_source 1.0.0
Installing method_source 1.0.0
Fetching opencensus 0.5.0
Installing opencensus 0.5.0
Fetching parallel 1.19.2
Installing parallel 1.19.2
Fetching parser 2.7.2.0
Installing parser 2.7.2.0
Fetching powerpack 0.1.2
Installing powerpack 0.1.2
Fetching pry 0.13.1
Installing pry 0.13.1
Fetching pry-byebug 3.9.0
Installing pry-byebug 3.9.0
Fetching yard 0.9.25
Installing yard 0.9.25
Fetching pry-doc 0.13.5
Installing pry-doc 0.13.5
Fetching rainbow 2.2.2
Installing rainbow 2.2.2 with native extensions
Fetching redcarpet 3.5.0
Installing redcarpet 3.5.0 with native extensions
Fetching redis 3.3.5
Installing redis 3.3.5
Fetching rmail 1.1.4
Installing rmail 1.1.4
Fetching ruby-progressbar 1.10.1
Installing ruby-progressbar 1.10.1
Fetching unicode-display_width 1.7.0
Installing unicode-display_width 1.7.0
Fetching rubocop 0.49.1
Installing rubocop 0.49.1
Fetching webmock 2.3.2
Installing webmock 2.3.2
Bundle complete! 31 Gemfile dependencies, 78 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
Post-install message from i18n:
HEADS UP! i18n 1.1 changed fallbacks to exclude default locale.
But that may break your application.
If you are upgrading your Rails application from an older version of Rails:
Please check your Rails app for 'config.i18n.fallbacks = true'.
If you're using I18n (>= 1.1.0) and Rails (< 5.2.2), this should be
'config.i18n.fallbacks = [I18n.default_locale]'.
If not, fallbacks will be broken in your app by I18n 1.1.x.
If you are starting a NEW Rails application, you can ignore this notice.
For more info see:
https://github.com/svenfuchs/i18n/releases/tag/v1.1.0
Post-install message from httparty:
When you HTTParty, you must party hard!
echo a | bundle exec bin/generate-api gen generated --api=sheets.v4 --names-out=/workspace/api_names_out.yaml
Loading sheets, version v4 from https://raw.githubusercontent.com/googleapis/discovery-artifact-manager/master/discoveries/sheets.v4.json
W, [2020-11-05T11:15:45.091678 #240] WARN -- : Found reserved property 'object_id'
W, [2020-11-05T11:15:45.091750 #240] WARN -- : Changed to 'object_id_prop'
W, [2020-11-05T11:15:45.107227 #240] WARN -- : Found reserved property 'object_id'
W, [2020-11-05T11:15:45.107277 #240] WARN -- : Changed to 'object_id_prop'
conflict google/apis/sheets_v4.rb
</apis/sheets_v4.rb? (enter "h" for help) [Ynaqdhm] a
force google/apis/sheets_v4.rb
identical google/apis/sheets_v4/service.rb
conflict google/apis/sheets_v4/classes.rb
force google/apis/sheets_v4/classes.rb
conflict google/apis/sheets_v4/representations.rb
force google/apis/sheets_v4/representations.rb
conflict /workspace/api_names_out.yaml
force /workspace/api_names_out.yaml
2020-11-05 03:15:50,065 synthtool [DEBUG] > Wrote metadata to generated/google/apis/sheets_v4/synth.metadata.
DEBUG:synthtool:Wrote metadata to generated/google/apis/sheets_v4/synth.metadata.
```
</details>
Full log will be available here:
https://source.cloud.google.com/results/invocations/749223e1-0b80-43a0-be68-640be14dbb8a/targets
- [ ] To automatically regenerate this PR, check this box.
2020-11-05 11:32:02 +00:00
|
|
|
# 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::SheetsV4::BooleanCondition]
|
|
|
|
attr_accessor :condition
|
|
|
|
|
|
|
|
# Whether values are visible by default. If true, the visible_values are ignored,
|
|
|
|
# all values that meet condition (if specified) are shown. If false, values
|
|
|
|
# that are both in visible_values and meet condition are shown.
|
|
|
|
# Corresponds to the JSON property `visibleByDefault`
|
|
|
|
# @return [Boolean]
|
|
|
|
attr_accessor :visible_by_default
|
|
|
|
alias_method :visible_by_default?, :visible_by_default
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# Values that should be included. Values not listed here are excluded.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `visibleValues`
|
|
|
|
# @return [Array<String>]
|
|
|
|
attr_accessor :visible_values
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
feat: Automated regeneration of sheets v4 client (#1404)
This PR was generated using Autosynth. :rainbow:
<details><summary>Log from Synthtool</summary>
```
2020-11-05 03:15:23,076 synthtool [DEBUG] > Executing /home/kbuilder/.cache/synthtool/google-api-ruby-client/synth.py.
On branch autosynth-sheets-v4
nothing to commit, working tree clean
2020-11-05 03:15:23,105 synthtool [DEBUG] > Running: docker run --rm -v/home/kbuilder/.cache/synthtool/google-api-ruby-client:/workspace -v/var/run/docker.sock:/var/run/docker.sock -w /workspace --entrypoint script/synth.rb gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/autosynth sheets v4
DEBUG:synthtool:Running: docker run --rm -v/home/kbuilder/.cache/synthtool/google-api-ruby-client:/workspace -v/var/run/docker.sock:/var/run/docker.sock -w /workspace --entrypoint script/synth.rb gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/autosynth sheets v4
bundle install
Don't run Bundler as root. Bundler can ask for sudo if it is needed, and
installing your bundle as root will break this application for all non-root
users on this machine.
The dependency jruby-openssl (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for java. To add those platforms to the bundle, run `bundle lock --add-platform java`.
Fetching gem metadata from https://rubygems.org/.........
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies...
Fetching rake 11.3.0
Installing rake 11.3.0
Fetching concurrent-ruby 1.1.7
Installing concurrent-ruby 1.1.7
Fetching i18n 1.8.5
Installing i18n 1.8.5
Fetching minitest 5.14.2
Installing minitest 5.14.2
Fetching thread_safe 0.3.6
Installing thread_safe 0.3.6
Fetching tzinfo 1.2.7
Installing tzinfo 1.2.7
Fetching activesupport 5.0.7.2
Installing activesupport 5.0.7.2
Fetching public_suffix 4.0.6
Installing public_suffix 4.0.6
Fetching addressable 2.7.0
Installing addressable 2.7.0
Fetching ast 2.4.1
Installing ast 2.4.1
Using bundler 2.1.4
Fetching byebug 11.1.3
Installing byebug 11.1.3 with native extensions
Fetching coderay 1.1.3
Installing coderay 1.1.3
Fetching json 2.3.1
Installing json 2.3.1 with native extensions
Fetching docile 1.3.2
Installing docile 1.3.2
Fetching simplecov-html 0.10.2
Installing simplecov-html 0.10.2
Fetching simplecov 0.16.1
Installing simplecov 0.16.1
Using sync 0.5.0
Fetching tins 1.26.0
Installing tins 1.26.0
Fetching term-ansicolor 1.7.1
Installing term-ansicolor 1.7.1
Fetching thor 0.20.3
Installing thor 0.20.3
Fetching coveralls 0.8.23
Installing coveralls 0.8.23
Fetching crack 0.4.4
Installing crack 0.4.4
Fetching declarative 0.0.20
Installing declarative 0.0.20
Fetching declarative-option 0.1.0
Installing declarative-option 0.1.0
Fetching diff-lcs 1.4.4
Installing diff-lcs 1.4.4
Fetching dotenv 2.7.6
Installing dotenv 2.7.6
Fetching fakefs 0.20.1
Installing fakefs 0.20.1
Fetching multipart-post 2.1.1
Installing multipart-post 2.1.1
Fetching ruby2_keywords 0.0.2
Installing ruby2_keywords 0.0.2
Fetching faraday 1.1.0
Installing faraday 1.1.0
Fetching gems 1.2.0
Installing gems 1.2.0
Fetching github-markup 1.7.0
Installing github-markup 1.7.0
Fetching jwt 2.2.2
Installing jwt 2.2.2
Fetching memoist 0.16.2
Installing memoist 0.16.2
Fetching multi_json 1.15.0
Installing multi_json 1.15.0
Fetching os 0.9.6
Installing os 0.9.6
Fetching signet 0.14.0
Installing signet 0.14.0
Fetching googleauth 0.14.0
Installing googleauth 0.14.0
Fetching httpclient 2.8.3
Installing httpclient 2.8.3
Fetching mini_mime 1.0.2
Installing mini_mime 1.0.2
Fetching uber 0.1.0
Installing uber 0.1.0
Fetching representable 3.0.4
Installing representable 3.0.4
Fetching retriable 3.1.2
Installing retriable 3.1.2
Fetching rexml 3.2.4
Installing rexml 3.2.4
Using google-api-client 0.48.0 from source at `.`
Fetching google-id-token 1.4.2
Installing google-id-token 1.4.2
Fetching hashdiff 1.0.1
Installing hashdiff 1.0.1
Fetching mime-types-data 3.2020.1104
Installing mime-types-data 3.2020.1104
Fetching mime-types 3.3.1
Installing mime-types 3.3.1
Fetching multi_xml 0.6.0
Installing multi_xml 0.6.0
Fetching httparty 0.18.1
Installing httparty 0.18.1
Fetching rspec-support 3.10.0
Installing rspec-support 3.10.0
Fetching rspec-core 3.10.0
Installing rspec-core 3.10.0
Fetching rspec-expectations 3.10.0
Installing rspec-expectations 3.10.0
Fetching rspec-mocks 3.10.0
Installing rspec-mocks 3.10.0
Fetching rspec 3.10.0
Installing rspec 3.10.0
Fetching json_spec 1.1.5
Installing json_spec 1.1.5
Fetching launchy 2.5.0
Installing launchy 2.5.0
Fetching little-plugger 1.1.4
Installing little-plugger 1.1.4
Fetching logging 2.3.0
Installing logging 2.3.0
Fetching method_source 1.0.0
Installing method_source 1.0.0
Fetching opencensus 0.5.0
Installing opencensus 0.5.0
Fetching parallel 1.19.2
Installing parallel 1.19.2
Fetching parser 2.7.2.0
Installing parser 2.7.2.0
Fetching powerpack 0.1.2
Installing powerpack 0.1.2
Fetching pry 0.13.1
Installing pry 0.13.1
Fetching pry-byebug 3.9.0
Installing pry-byebug 3.9.0
Fetching yard 0.9.25
Installing yard 0.9.25
Fetching pry-doc 0.13.5
Installing pry-doc 0.13.5
Fetching rainbow 2.2.2
Installing rainbow 2.2.2 with native extensions
Fetching redcarpet 3.5.0
Installing redcarpet 3.5.0 with native extensions
Fetching redis 3.3.5
Installing redis 3.3.5
Fetching rmail 1.1.4
Installing rmail 1.1.4
Fetching ruby-progressbar 1.10.1
Installing ruby-progressbar 1.10.1
Fetching unicode-display_width 1.7.0
Installing unicode-display_width 1.7.0
Fetching rubocop 0.49.1
Installing rubocop 0.49.1
Fetching webmock 2.3.2
Installing webmock 2.3.2
Bundle complete! 31 Gemfile dependencies, 78 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
Post-install message from i18n:
HEADS UP! i18n 1.1 changed fallbacks to exclude default locale.
But that may break your application.
If you are upgrading your Rails application from an older version of Rails:
Please check your Rails app for 'config.i18n.fallbacks = true'.
If you're using I18n (>= 1.1.0) and Rails (< 5.2.2), this should be
'config.i18n.fallbacks = [I18n.default_locale]'.
If not, fallbacks will be broken in your app by I18n 1.1.x.
If you are starting a NEW Rails application, you can ignore this notice.
For more info see:
https://github.com/svenfuchs/i18n/releases/tag/v1.1.0
Post-install message from httparty:
When you HTTParty, you must party hard!
echo a | bundle exec bin/generate-api gen generated --api=sheets.v4 --names-out=/workspace/api_names_out.yaml
Loading sheets, version v4 from https://raw.githubusercontent.com/googleapis/discovery-artifact-manager/master/discoveries/sheets.v4.json
W, [2020-11-05T11:15:45.091678 #240] WARN -- : Found reserved property 'object_id'
W, [2020-11-05T11:15:45.091750 #240] WARN -- : Changed to 'object_id_prop'
W, [2020-11-05T11:15:45.107227 #240] WARN -- : Found reserved property 'object_id'
W, [2020-11-05T11:15:45.107277 #240] WARN -- : Changed to 'object_id_prop'
conflict google/apis/sheets_v4.rb
</apis/sheets_v4.rb? (enter "h" for help) [Ynaqdhm] a
force google/apis/sheets_v4.rb
identical google/apis/sheets_v4/service.rb
conflict google/apis/sheets_v4/classes.rb
force google/apis/sheets_v4/classes.rb
conflict google/apis/sheets_v4/representations.rb
force google/apis/sheets_v4/representations.rb
conflict /workspace/api_names_out.yaml
force /workspace/api_names_out.yaml
2020-11-05 03:15:50,065 synthtool [DEBUG] > Wrote metadata to generated/google/apis/sheets_v4/synth.metadata.
DEBUG:synthtool:Wrote metadata to generated/google/apis/sheets_v4/synth.metadata.
```
</details>
Full log will be available here:
https://source.cloud.google.com/results/invocations/749223e1-0b80-43a0-be68-640be14dbb8a/targets
- [ ] To automatically regenerate this PR, check this box.
2020-11-05 11:32:02 +00:00
|
|
|
@condition = args[:condition] if args.key?(:condition)
|
|
|
|
@visible_by_default = args[:visible_by_default] if args.key?(:visible_by_default)
|
2017-08-25 19:54:22 +00:00
|
|
|
@visible_values = args[:visible_values] if args.key?(:visible_values)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2020-08-28 00:38:58 +00:00
|
|
|
# The pivot table filter criteria associated with a specific source column
|
|
|
|
# offset.
|
|
|
|
class PivotFilterSpec
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
|
|
|
# The column offset of the source range.
|
|
|
|
# Corresponds to the JSON property `columnOffsetIndex`
|
|
|
|
# @return [Fixnum]
|
|
|
|
attr_accessor :column_offset_index
|
|
|
|
|
2020-09-29 00:38:39 +00:00
|
|
|
# An unique identifier that references a data source column.
|
2020-08-28 00:38:58 +00:00
|
|
|
# Corresponds to the JSON property `dataSourceColumnReference`
|
|
|
|
# @return [Google::Apis::SheetsV4::DataSourceColumnReference]
|
|
|
|
attr_accessor :data_source_column_reference
|
|
|
|
|
|
|
|
# Criteria for showing/hiding rows in a pivot table.
|
|
|
|
# Corresponds to the JSON property `filterCriteria`
|
|
|
|
# @return [Google::Apis::SheetsV4::PivotFilterCriteria]
|
|
|
|
attr_accessor :filter_criteria
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@column_offset_index = args[:column_offset_index] if args.key?(:column_offset_index)
|
|
|
|
@data_source_column_reference = args[:data_source_column_reference] if args.key?(:data_source_column_reference)
|
|
|
|
@filter_criteria = args[:filter_criteria] if args.key?(:filter_criteria)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# A single grouping (either row or column) in a pivot table.
|
|
|
|
class PivotGroup
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2020-09-29 00:38:39 +00:00
|
|
|
# An unique identifier that references a data source column.
|
2020-08-28 00:38:58 +00:00
|
|
|
# Corresponds to the JSON property `dataSourceColumnReference`
|
|
|
|
# @return [Google::Apis::SheetsV4::DataSourceColumnReference]
|
|
|
|
attr_accessor :data_source_column_reference
|
|
|
|
|
|
|
|
# The count limit on rows or columns in the pivot group.
|
|
|
|
# Corresponds to the JSON property `groupLimit`
|
|
|
|
# @return [Google::Apis::SheetsV4::PivotGroupLimit]
|
|
|
|
attr_accessor :group_limit
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# An optional setting on a PivotGroup that defines buckets for the values in the
|
|
|
|
# source data column rather than breaking out each individual value. Only one
|
|
|
|
# PivotGroup with a group rule may be added for each column in the source data,
|
|
|
|
# though on any given column you may add both a PivotGroup that has a rule and a
|
|
|
|
# PivotGroup that does not.
|
2018-01-30 00:35:59 +00:00
|
|
|
# Corresponds to the JSON property `groupRule`
|
|
|
|
# @return [Google::Apis::SheetsV4::PivotGroupRule]
|
|
|
|
attr_accessor :group_rule
|
|
|
|
|
|
|
|
# The labels to use for the row/column groups which can be customized. For
|
2020-08-18 00:38:22 +00:00
|
|
|
# example, in the following pivot table, the row label is `Region` (which could
|
|
|
|
# be renamed to `State`) and the column label is `Product` (which could be
|
|
|
|
# renamed `Item`). Pivot tables created before December 2017 do not have header
|
|
|
|
# labels. If you'd like to add header labels to an existing pivot table, please
|
|
|
|
# delete the existing pivot table and then create a new pivot table with same
|
|
|
|
# parameters. +--------------+---------+-------+ | SUM of Units | Product | | |
|
|
|
|
# Region | Pen | Paper | +--------------+---------+-------+ | New York | 345 |
|
|
|
|
# 98 | | Oregon | 234 | 123 | | Tennessee | 531 | 415 | +--------------+---------
|
|
|
|
# +-------+ | Grand Total | 1110 | 636 | +--------------+---------+-------+
|
2018-01-30 00:35:59 +00:00
|
|
|
# Corresponds to the JSON property `label`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :label
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# True if the headings in this pivot group should be repeated. This is only
|
|
|
|
# valid for row groupings and is ignored by columns. By default, we minimize
|
|
|
|
# repitition of headings by not showing higher level headings where they are the
|
|
|
|
# same. For example, even though the third row below corresponds to "Q1 Mar", "
|
|
|
|
# Q1" is not shown because it is redundant with previous rows. Setting
|
|
|
|
# repeat_headings to true would cause "Q1" to be repeated for "Feb" and "Mar". +-
|
|
|
|
# -------------+ | Q1 | Jan | | | Feb | | | Mar | +--------+-----+ | Q1 Total | +
|
|
|
|
# --------------+
|
2018-01-30 00:35:59 +00:00
|
|
|
# Corresponds to the JSON property `repeatHeadings`
|
|
|
|
# @return [Boolean]
|
|
|
|
attr_accessor :repeat_headings
|
|
|
|
alias_method :repeat_headings?, :repeat_headings
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# True if the pivot table should include the totals for this grouping.
|
|
|
|
# Corresponds to the JSON property `showTotals`
|
|
|
|
# @return [Boolean]
|
|
|
|
attr_accessor :show_totals
|
|
|
|
alias_method :show_totals?, :show_totals
|
|
|
|
|
|
|
|
# The order the values in this group should be sorted.
|
|
|
|
# Corresponds to the JSON property `sortOrder`
|
2017-07-12 20:10:42 +00:00
|
|
|
# @return [String]
|
2017-08-25 19:54:22 +00:00
|
|
|
attr_accessor :sort_order
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The column offset of the source range that this grouping is based on. For
|
|
|
|
# example, if the source was `C10:E15`, a `sourceColumnOffset` of `0` means this
|
|
|
|
# group refers to column `C`, whereas the offset `1` would refer to column `D`.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `sourceColumnOffset`
|
|
|
|
# @return [Fixnum]
|
|
|
|
attr_accessor :source_column_offset
|
|
|
|
|
|
|
|
# Information about which values in a pivot group should be used for sorting.
|
|
|
|
# Corresponds to the JSON property `valueBucket`
|
|
|
|
# @return [Google::Apis::SheetsV4::PivotGroupSortValueBucket]
|
|
|
|
attr_accessor :value_bucket
|
|
|
|
|
|
|
|
# Metadata about values in the grouping.
|
|
|
|
# Corresponds to the JSON property `valueMetadata`
|
|
|
|
# @return [Array<Google::Apis::SheetsV4::PivotGroupValueMetadata>]
|
|
|
|
attr_accessor :value_metadata
|
2017-03-30 22:30:51 +00:00
|
|
|
|
2016-05-16 16:49:15 +00:00
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2020-08-28 00:38:58 +00:00
|
|
|
@data_source_column_reference = args[:data_source_column_reference] if args.key?(:data_source_column_reference)
|
|
|
|
@group_limit = args[:group_limit] if args.key?(:group_limit)
|
2018-01-30 00:35:59 +00:00
|
|
|
@group_rule = args[:group_rule] if args.key?(:group_rule)
|
|
|
|
@label = args[:label] if args.key?(:label)
|
|
|
|
@repeat_headings = args[:repeat_headings] if args.key?(:repeat_headings)
|
2017-08-25 19:54:22 +00:00
|
|
|
@show_totals = args[:show_totals] if args.key?(:show_totals)
|
|
|
|
@sort_order = args[:sort_order] if args.key?(:sort_order)
|
|
|
|
@source_column_offset = args[:source_column_offset] if args.key?(:source_column_offset)
|
|
|
|
@value_bucket = args[:value_bucket] if args.key?(:value_bucket)
|
|
|
|
@value_metadata = args[:value_metadata] if args.key?(:value_metadata)
|
2017-03-31 19:53:27 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2020-08-28 00:38:58 +00:00
|
|
|
# The count limit on rows or columns in the pivot group.
|
|
|
|
class PivotGroupLimit
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
|
|
|
# The order in which the group limit is applied to the pivot table. Pivot group
|
|
|
|
# limits are applied from lower to higher order number. Order numbers are
|
|
|
|
# normalized to consecutive integers from 0. For write request, to fully
|
|
|
|
# customize the applying orders, all pivot group limits should have this field
|
|
|
|
# set with an unique number. Otherwise, the order is determined by the index in
|
|
|
|
# the PivotTable.rows list and then the PivotTable.columns list.
|
|
|
|
# Corresponds to the JSON property `applyOrder`
|
|
|
|
# @return [Fixnum]
|
|
|
|
attr_accessor :apply_order
|
|
|
|
|
|
|
|
# The count limit.
|
|
|
|
# Corresponds to the JSON property `countLimit`
|
|
|
|
# @return [Fixnum]
|
|
|
|
attr_accessor :count_limit
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@apply_order = args[:apply_order] if args.key?(:apply_order)
|
|
|
|
@count_limit = args[:count_limit] if args.key?(:count_limit)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# An optional setting on a PivotGroup that defines buckets for the values in the
|
|
|
|
# source data column rather than breaking out each individual value. Only one
|
|
|
|
# PivotGroup with a group rule may be added for each column in the source data,
|
|
|
|
# though on any given column you may add both a PivotGroup that has a rule and a
|
|
|
|
# PivotGroup that does not.
|
2018-01-30 00:35:59 +00:00
|
|
|
class PivotGroupRule
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2018-05-08 00:35:49 +00:00
|
|
|
# Allows you to organize the date-time values in a source data column into
|
|
|
|
# buckets based on selected parts of their date or time values. For example,
|
2020-08-18 00:38:22 +00:00
|
|
|
# consider a pivot table showing sales transactions by date: +----------+--------
|
|
|
|
# ------+ | Date | SUM of Sales | +----------+--------------+ | 1/1/2017 | $621.
|
|
|
|
# 14 | | 2/3/2017 | $708.84 | | 5/8/2017 | $326.84 | ... +----------+------------
|
|
|
|
# --+ Applying a date-time group rule with a DateTimeRuleType of YEAR_MONTH
|
|
|
|
# results in the following pivot table. +--------------+--------------+ |
|
|
|
|
# Grouped Date | SUM of Sales | +--------------+--------------+ | 2017-Jan | $53,
|
|
|
|
# 731.78 | | 2017-Feb | $83,475.32 | | 2017-Mar | $94,385.05 | ... +-------------
|
|
|
|
# -+--------------+
|
2018-05-08 00:35:49 +00:00
|
|
|
# Corresponds to the JSON property `dateTimeRule`
|
|
|
|
# @return [Google::Apis::SheetsV4::DateTimeRule]
|
|
|
|
attr_accessor :date_time_rule
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# Allows you to organize the numeric values in a source data column into buckets
|
|
|
|
# of a constant size. All values from HistogramRule.start to HistogramRule.end
|
|
|
|
# are placed into groups of size HistogramRule.interval. In addition, all values
|
|
|
|
# below HistogramRule.start are placed in one group, and all values above
|
|
|
|
# HistogramRule.end are placed in another. Only HistogramRule.interval is
|
|
|
|
# required, though if HistogramRule.start and HistogramRule.end are both
|
|
|
|
# provided, HistogramRule.start must be less than HistogramRule.end. For example,
|
|
|
|
# a pivot table showing average purchase amount by age that has 50+ rows: +-----
|
|
|
|
# +-------------------+ | Age | AVERAGE of Amount | +-----+-------------------+ |
|
|
|
|
# 16 | $27.13 | | 17 | $5.24 | | 18 | $20.15 | ... +-----+-------------------+
|
|
|
|
# could be turned into a pivot table that looks like the one below by applying a
|
|
|
|
# histogram group rule with a HistogramRule.start of 25, an HistogramRule.
|
|
|
|
# interval of 20, and an HistogramRule.end of 65. +-------------+----------------
|
|
|
|
# ---+ | Grouped Age | AVERAGE of Amount | +-------------+-------------------+ |
|
|
|
|
# < 25 | $19.34 | | 25-45 | $31.43 | | 45-65 | $35.87 | | > 65 | $27.55 | +------
|
|
|
|
# -------+-------------------+ | Grand Total | $29.12 | +-------------+----------
|
|
|
|
# ---------+
|
2018-01-30 00:35:59 +00:00
|
|
|
# Corresponds to the JSON property `histogramRule`
|
|
|
|
# @return [Google::Apis::SheetsV4::HistogramRule]
|
|
|
|
attr_accessor :histogram_rule
|
|
|
|
|
|
|
|
# Allows you to manually organize the values in a source data column into
|
|
|
|
# buckets with names of your choosing. For example, a pivot table that
|
2020-08-18 00:38:22 +00:00
|
|
|
# aggregates population by state: +-------+-------------------+ | State | SUM of
|
|
|
|
# Population | +-------+-------------------+ | AK | 0.7 | | AL | 4.8 | | AR | 2.
|
|
|
|
# 9 | ... +-------+-------------------+ could be turned into a pivot table that
|
|
|
|
# aggregates population by time zone by providing a list of groups (for example,
|
|
|
|
# groupName = 'Central', items = ['AL', 'AR', 'IA', ...]) to a manual group rule.
|
|
|
|
# Note that a similar effect could be achieved by adding a time zone column to
|
|
|
|
# the source data and adjusting the pivot table. +-----------+-------------------
|
|
|
|
# + | Time Zone | SUM of Population | +-----------+-------------------+ |
|
|
|
|
# Central | 106.3 | | Eastern | 151.9 | | Mountain | 17.4 | ... +-----------+----
|
|
|
|
# ---------------+
|
2018-01-30 00:35:59 +00:00
|
|
|
# Corresponds to the JSON property `manualRule`
|
|
|
|
# @return [Google::Apis::SheetsV4::ManualRule]
|
|
|
|
attr_accessor :manual_rule
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2018-05-08 00:35:49 +00:00
|
|
|
@date_time_rule = args[:date_time_rule] if args.key?(:date_time_rule)
|
2018-01-30 00:35:59 +00:00
|
|
|
@histogram_rule = args[:histogram_rule] if args.key?(:histogram_rule)
|
|
|
|
@manual_rule = args[:manual_rule] if args.key?(:manual_rule)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Information about which values in a pivot group should be used for sorting.
|
|
|
|
class PivotGroupSortValueBucket
|
2017-03-31 19:53:27 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# Determines the bucket from which values are chosen to sort. For example, in a
|
|
|
|
# pivot table with one row group & two column groups, the row group can list up
|
|
|
|
# to two values. The first value corresponds to a value within the first column
|
|
|
|
# group, and the second value corresponds to a value in the second column group.
|
|
|
|
# If no values are listed, this would indicate that the row should be sorted
|
|
|
|
# according to the "Grand Total" over the column groups. If a single value is
|
|
|
|
# listed, this would correspond to using the "Total" of that bucket.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `buckets`
|
|
|
|
# @return [Array<Google::Apis::SheetsV4::ExtendedValue>]
|
|
|
|
attr_accessor :buckets
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The offset in the PivotTable.values list which the values in this grouping
|
|
|
|
# should be sorted by.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `valuesIndex`
|
2017-07-12 20:10:42 +00:00
|
|
|
# @return [Fixnum]
|
2017-08-25 19:54:22 +00:00
|
|
|
attr_accessor :values_index
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@buckets = args[:buckets] if args.key?(:buckets)
|
|
|
|
@values_index = args[:values_index] if args.key?(:values_index)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
# Metadata about a value in a pivot grouping.
|
|
|
|
class PivotGroupValueMetadata
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
|
|
|
# True if the data corresponding to the value is collapsed.
|
|
|
|
# Corresponds to the JSON property `collapsed`
|
|
|
|
# @return [Boolean]
|
|
|
|
attr_accessor :collapsed
|
|
|
|
alias_method :collapsed?, :collapsed
|
|
|
|
|
|
|
|
# The kinds of value that a cell in a spreadsheet can have.
|
|
|
|
# Corresponds to the JSON property `value`
|
|
|
|
# @return [Google::Apis::SheetsV4::ExtendedValue]
|
|
|
|
attr_accessor :value
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@collapsed = args[:collapsed] if args.key?(:collapsed)
|
|
|
|
@value = args[:value] if args.key?(:value)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
# A pivot table.
|
|
|
|
class PivotTable
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
|
|
|
# Each column grouping in the pivot table.
|
|
|
|
# Corresponds to the JSON property `columns`
|
|
|
|
# @return [Array<Google::Apis::SheetsV4::PivotGroup>]
|
|
|
|
attr_accessor :columns
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# An optional mapping of filters per source column offset. The filters are
|
|
|
|
# applied before aggregating data into the pivot table. The map's key is the
|
|
|
|
# column offset of the source range that you want to filter, and the value is
|
|
|
|
# the criteria for that column. For example, if the source was `C10:E15`, a key
|
|
|
|
# of `0` will have the filter for column `C`, whereas the key `1` is for column `
|
2020-09-29 00:38:39 +00:00
|
|
|
# D`. This field is deprecated in favor of filter_specs.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `criteria`
|
|
|
|
# @return [Hash<String,Google::Apis::SheetsV4::PivotFilterCriteria>]
|
|
|
|
attr_accessor :criteria
|
|
|
|
|
2020-09-29 00:38:39 +00:00
|
|
|
# The data execution status. A data execution is created to sync a data source
|
|
|
|
# object with the latest data from a DataSource. It is usually scheduled to run
|
|
|
|
# at background, you can check its state to tell if an execution completes There
|
|
|
|
# are several scenarios where a data execution is triggered to run: * Adding a
|
|
|
|
# data source creates an associated data source sheet as well as a data
|
|
|
|
# execution to sync the data from the data source to the sheet. * Updating a
|
|
|
|
# data source creates a data execution to refresh the associated data source
|
|
|
|
# sheet similarly. * You can send refresh request to explicitly refresh one or
|
|
|
|
# multiple data source objects.
|
2020-08-28 00:38:58 +00:00
|
|
|
# Corresponds to the JSON property `dataExecutionStatus`
|
|
|
|
# @return [Google::Apis::SheetsV4::DataExecutionStatus]
|
|
|
|
attr_accessor :data_execution_status
|
|
|
|
|
|
|
|
# The ID of the data source the pivot table is reading data from.
|
|
|
|
# Corresponds to the JSON property `dataSourceId`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :data_source_id
|
|
|
|
|
|
|
|
# The filters applied to the source columns before aggregating data for the
|
|
|
|
# pivot table. Both criteria and filter_specs are populated in responses. If
|
|
|
|
# both fields are specified in an update request, this field takes precedence.
|
|
|
|
# Corresponds to the JSON property `filterSpecs`
|
|
|
|
# @return [Array<Google::Apis::SheetsV4::PivotFilterSpec>]
|
|
|
|
attr_accessor :filter_specs
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Each row grouping in the pivot table.
|
|
|
|
# Corresponds to the JSON property `rows`
|
|
|
|
# @return [Array<Google::Apis::SheetsV4::PivotGroup>]
|
|
|
|
attr_accessor :rows
|
2017-06-14 17:02:03 +00:00
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# A range on a sheet. All indexes are zero-based. Indexes are half open, i.e.
|
|
|
|
# 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 sheet 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!`.
|
2017-07-12 20:10:42 +00:00
|
|
|
# Corresponds to the JSON property `source`
|
2017-05-26 16:44:32 +00:00
|
|
|
# @return [Google::Apis::SheetsV4::GridRange]
|
2017-07-12 20:10:42 +00:00
|
|
|
attr_accessor :source
|
2017-05-26 16:44:32 +00:00
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# Whether values should be listed horizontally (as columns) or vertically (as
|
|
|
|
# rows).
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `valueLayout`
|
2017-07-12 20:10:42 +00:00
|
|
|
# @return [String]
|
2017-08-25 19:54:22 +00:00
|
|
|
attr_accessor :value_layout
|
|
|
|
|
|
|
|
# A list of values to include in the pivot table.
|
|
|
|
# Corresponds to the JSON property `values`
|
|
|
|
# @return [Array<Google::Apis::SheetsV4::PivotValue>]
|
|
|
|
attr_accessor :values
|
2017-03-31 19:53:27 +00:00
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@columns = args[:columns] if args.key?(:columns)
|
|
|
|
@criteria = args[:criteria] if args.key?(:criteria)
|
2020-08-28 00:38:58 +00:00
|
|
|
@data_execution_status = args[:data_execution_status] if args.key?(:data_execution_status)
|
|
|
|
@data_source_id = args[:data_source_id] if args.key?(:data_source_id)
|
|
|
|
@filter_specs = args[:filter_specs] if args.key?(:filter_specs)
|
2017-08-25 19:54:22 +00:00
|
|
|
@rows = args[:rows] if args.key?(:rows)
|
2017-07-12 20:10:42 +00:00
|
|
|
@source = args[:source] if args.key?(:source)
|
2017-08-25 19:54:22 +00:00
|
|
|
@value_layout = args[:value_layout] if args.key?(:value_layout)
|
|
|
|
@values = args[:values] if args.key?(:values)
|
2017-05-04 19:35:56 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The definition of how a value in a pivot table should be calculated.
|
|
|
|
class PivotValue
|
2017-05-04 19:35:56 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# If specified, indicates that pivot values should be displayed as the result of
|
|
|
|
# a calculation with another pivot value. For example, if
|
|
|
|
# calculated_display_type is specified as PERCENT_OF_GRAND_TOTAL, all the pivot
|
2020-08-28 00:38:58 +00:00
|
|
|
# values are displayed as the percentage of the grand total. In the Sheets
|
|
|
|
# editor, this is referred to as "Show As" in the value section of a pivot table.
|
2018-01-30 00:35:59 +00:00
|
|
|
# Corresponds to the JSON property `calculatedDisplayType`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :calculated_display_type
|
|
|
|
|
2020-09-29 00:38:39 +00:00
|
|
|
# An unique identifier that references a data source column.
|
2020-08-28 00:38:58 +00:00
|
|
|
# Corresponds to the JSON property `dataSourceColumnReference`
|
|
|
|
# @return [Google::Apis::SheetsV4::DataSourceColumnReference]
|
|
|
|
attr_accessor :data_source_column_reference
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# A custom formula to calculate the value. The formula must start with an `=`
|
|
|
|
# character.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `formula`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :formula
|
2017-05-26 16:44:32 +00:00
|
|
|
|
2017-10-17 00:35:38 +00:00
|
|
|
# A name to use for the value.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `name`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :name
|
2017-05-26 16:44:32 +00:00
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The column offset of the source range that this value reads from. For example,
|
|
|
|
# if the source was `C10:E15`, a `sourceColumnOffset` of `0` means this value
|
|
|
|
# refers to column `C`, whereas the offset `1` would refer to column `D`.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `sourceColumnOffset`
|
|
|
|
# @return [Fixnum]
|
|
|
|
attr_accessor :source_column_offset
|
2017-03-31 19:53:27 +00:00
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# A function to summarize the value. If formula is set, the only supported
|
|
|
|
# values are SUM and CUSTOM. If sourceColumnOffset is set, then `CUSTOM` is not
|
|
|
|
# supported.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `summarizeFunction`
|
2017-06-14 17:02:03 +00:00
|
|
|
# @return [String]
|
2017-08-25 19:54:22 +00:00
|
|
|
attr_accessor :summarize_function
|
2017-06-02 06:11:31 +00:00
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2018-01-30 00:35:59 +00:00
|
|
|
@calculated_display_type = args[:calculated_display_type] if args.key?(:calculated_display_type)
|
2020-08-28 00:38:58 +00:00
|
|
|
@data_source_column_reference = args[:data_source_column_reference] if args.key?(:data_source_column_reference)
|
2017-08-25 19:54:22 +00:00
|
|
|
@formula = args[:formula] if args.key?(:formula)
|
|
|
|
@name = args[:name] if args.key?(:name)
|
|
|
|
@source_column_offset = args[:source_column_offset] if args.key?(:source_column_offset)
|
|
|
|
@summarize_function = args[:summarize_function] if args.key?(:summarize_function)
|
2017-03-27 22:14:47 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# A protected range.
|
|
|
|
class ProtectedRange
|
2017-03-27 22:14:47 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The description of this protected range.
|
|
|
|
# Corresponds to the JSON property `description`
|
2017-06-02 06:11:31 +00:00
|
|
|
# @return [String]
|
2017-08-25 19:54:22 +00:00
|
|
|
attr_accessor :description
|
2017-05-26 16:44:32 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The editors of a protected range.
|
|
|
|
# Corresponds to the JSON property `editors`
|
|
|
|
# @return [Google::Apis::SheetsV4::Editors]
|
|
|
|
attr_accessor :editors
|
2017-05-26 16:44:32 +00:00
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The named range this protected range is backed by, if any. When writing, only
|
|
|
|
# one of range or named_range_id may be set.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `namedRangeId`
|
2017-05-26 16:44:32 +00:00
|
|
|
# @return [String]
|
2017-08-25 19:54:22 +00:00
|
|
|
attr_accessor :named_range_id
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The ID of the protected range. This field is read-only.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `protectedRangeId`
|
|
|
|
# @return [Fixnum]
|
|
|
|
attr_accessor :protected_range_id
|
2017-05-26 16:44:32 +00:00
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# A range on a sheet. All indexes are zero-based. Indexes are half open, i.e.
|
|
|
|
# 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 sheet 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!`.
|
2017-07-12 20:10:42 +00:00
|
|
|
# Corresponds to the JSON property `range`
|
|
|
|
# @return [Google::Apis::SheetsV4::GridRange]
|
|
|
|
attr_accessor :range
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# True if the user who requested this protected range can edit the protected
|
|
|
|
# area. This field is read-only.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `requestingUserCanEdit`
|
|
|
|
# @return [Boolean]
|
|
|
|
attr_accessor :requesting_user_can_edit
|
|
|
|
alias_method :requesting_user_can_edit?, :requesting_user_can_edit
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The list of unprotected ranges within a protected sheet. Unprotected ranges
|
|
|
|
# are only supported on protected sheets.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `unprotectedRanges`
|
|
|
|
# @return [Array<Google::Apis::SheetsV4::GridRange>]
|
|
|
|
attr_accessor :unprotected_ranges
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# True if 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
|
|
|
|
# writing: 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.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `warningOnly`
|
|
|
|
# @return [Boolean]
|
|
|
|
attr_accessor :warning_only
|
|
|
|
alias_method :warning_only?, :warning_only
|
2017-05-04 19:35:56 +00:00
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@description = args[:description] if args.key?(:description)
|
|
|
|
@editors = args[:editors] if args.key?(:editors)
|
2017-07-12 20:10:42 +00:00
|
|
|
@named_range_id = args[:named_range_id] if args.key?(:named_range_id)
|
2017-08-25 19:54:22 +00:00
|
|
|
@protected_range_id = args[:protected_range_id] if args.key?(:protected_range_id)
|
2017-07-12 20:10:42 +00:00
|
|
|
@range = args[:range] if args.key?(:range)
|
2017-08-25 19:54:22 +00:00
|
|
|
@requesting_user_can_edit = args[:requesting_user_can_edit] if args.key?(:requesting_user_can_edit)
|
|
|
|
@unprotected_ranges = args[:unprotected_ranges] if args.key?(:unprotected_ranges)
|
|
|
|
@warning_only = args[:warning_only] if args.key?(:warning_only)
|
2017-05-04 19:35:56 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Randomizes the order of the rows in a range.
|
|
|
|
class RandomizeRangeRequest
|
2017-05-04 19:35:56 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# A range on a sheet. All indexes are zero-based. Indexes are half open, i.e.
|
|
|
|
# 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 sheet 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!`.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `range`
|
|
|
|
# @return [Google::Apis::SheetsV4::GridRange]
|
|
|
|
attr_accessor :range
|
2017-05-04 19:35:56 +00:00
|
|
|
|
2017-05-26 16:44:32 +00:00
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
2017-05-04 19:35:56 +00:00
|
|
|
|
2017-05-26 16:44:32 +00:00
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@range = args[:range] if args.key?(:range)
|
2017-05-26 16:44:32 +00:00
|
|
|
end
|
|
|
|
end
|
2017-05-04 19:35:56 +00:00
|
|
|
|
2020-08-28 00:38:58 +00:00
|
|
|
# The execution status of refreshing one data source object.
|
|
|
|
class RefreshDataSourceObjectExecutionStatus
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2020-09-29 00:38:39 +00:00
|
|
|
# The data execution status. A data execution is created to sync a data source
|
|
|
|
# object with the latest data from a DataSource. It is usually scheduled to run
|
|
|
|
# at background, you can check its state to tell if an execution completes There
|
|
|
|
# are several scenarios where a data execution is triggered to run: * Adding a
|
|
|
|
# data source creates an associated data source sheet as well as a data
|
|
|
|
# execution to sync the data from the data source to the sheet. * Updating a
|
|
|
|
# data source creates a data execution to refresh the associated data source
|
|
|
|
# sheet similarly. * You can send refresh request to explicitly refresh one or
|
|
|
|
# multiple data source objects.
|
2020-08-28 00:38:58 +00:00
|
|
|
# Corresponds to the JSON property `dataExecutionStatus`
|
|
|
|
# @return [Google::Apis::SheetsV4::DataExecutionStatus]
|
|
|
|
attr_accessor :data_execution_status
|
|
|
|
|
|
|
|
# Reference to a data source object.
|
|
|
|
# Corresponds to the JSON property `reference`
|
|
|
|
# @return [Google::Apis::SheetsV4::DataSourceObjectReference]
|
|
|
|
attr_accessor :reference
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@data_execution_status = args[:data_execution_status] if args.key?(:data_execution_status)
|
|
|
|
@reference = args[:reference] if args.key?(:reference)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
# Refreshes one or multiple data source objects in the spreadsheet by the
|
2020-09-29 00:38:39 +00:00
|
|
|
# specified references. The request requires an additional `bigquery.readonly`
|
|
|
|
# OAuth scope. If there are multiple refresh requests referencing the same data
|
2020-08-28 00:38:58 +00:00
|
|
|
# source objects in one batch, only the last refresh request is processed, and
|
|
|
|
# all those requests will have the same response accordingly.
|
|
|
|
class RefreshDataSourceRequest
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
|
|
|
# Reference to a DataSource. If specified, refreshes all associated data source
|
|
|
|
# objects for the data source.
|
|
|
|
# Corresponds to the JSON property `dataSourceId`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :data_source_id
|
|
|
|
|
|
|
|
# Refreshes the data source objects regardless of the current state. If not set
|
|
|
|
# and a referenced data source object was in error state, the refresh will fail
|
|
|
|
# immediately.
|
|
|
|
# Corresponds to the JSON property `force`
|
|
|
|
# @return [Boolean]
|
|
|
|
attr_accessor :force
|
|
|
|
alias_method :force?, :force
|
|
|
|
|
|
|
|
# Refreshes all existing data source objects in the spreadsheet.
|
|
|
|
# Corresponds to the JSON property `isAll`
|
|
|
|
# @return [Boolean]
|
|
|
|
attr_accessor :is_all
|
|
|
|
alias_method :is_all?, :is_all
|
|
|
|
|
|
|
|
# A list of references to data source objects.
|
|
|
|
# Corresponds to the JSON property `references`
|
|
|
|
# @return [Google::Apis::SheetsV4::DataSourceObjectReferences]
|
|
|
|
attr_accessor :references
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@data_source_id = args[:data_source_id] if args.key?(:data_source_id)
|
|
|
|
@force = args[:force] if args.key?(:force)
|
|
|
|
@is_all = args[:is_all] if args.key?(:is_all)
|
|
|
|
@references = args[:references] if args.key?(:references)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
# The response from refreshing one or multiple data source objects.
|
|
|
|
class RefreshDataSourceResponse
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
|
|
|
# All the refresh status for the data source object references specified in the
|
|
|
|
# request. If is_all is specified, the field contains only those in failure
|
|
|
|
# status.
|
|
|
|
# Corresponds to the JSON property `statuses`
|
|
|
|
# @return [Array<Google::Apis::SheetsV4::RefreshDataSourceObjectExecutionStatus>]
|
|
|
|
attr_accessor :statuses
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@statuses = args[:statuses] if args.key?(:statuses)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# Updates all cells in the range to the values in the given Cell object. Only
|
|
|
|
# the fields listed in the fields field are updated; others are unchanged. 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, use the formula `=
|
|
|
|
# $A$1` to prevent both the row and the column from incrementing.
|
2017-08-25 19:54:22 +00:00
|
|
|
class RepeatCellRequest
|
2017-05-26 16:44:32 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Data about a specific cell.
|
|
|
|
# Corresponds to the JSON property `cell`
|
|
|
|
# @return [Google::Apis::SheetsV4::CellData]
|
|
|
|
attr_accessor :cell
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The fields that should be updated. At least one field must be specified. The
|
|
|
|
# root `cell` is implied and should not be specified. A single `"*"` can be used
|
|
|
|
# as short-hand for listing every field.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `fields`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :fields
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# A range on a sheet. All indexes are zero-based. Indexes are half open, i.e.
|
|
|
|
# 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 sheet 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!`.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `range`
|
|
|
|
# @return [Google::Apis::SheetsV4::GridRange]
|
|
|
|
attr_accessor :range
|
2017-05-04 19:35:56 +00:00
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@cell = args[:cell] if args.key?(:cell)
|
|
|
|
@fields = args[:fields] if args.key?(:fields)
|
|
|
|
@range = args[:range] if args.key?(:range)
|
2017-05-04 19:35:56 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# A single kind of update to apply to a spreadsheet.
|
|
|
|
class Request
|
2017-05-04 19:35:56 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Adds a new banded range to the spreadsheet.
|
|
|
|
# Corresponds to the JSON property `addBanding`
|
|
|
|
# @return [Google::Apis::SheetsV4::AddBandingRequest]
|
|
|
|
attr_accessor :add_banding
|
|
|
|
|
|
|
|
# Adds a chart to a sheet in the spreadsheet.
|
|
|
|
# Corresponds to the JSON property `addChart`
|
|
|
|
# @return [Google::Apis::SheetsV4::AddChartRequest]
|
|
|
|
attr_accessor :add_chart
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# Adds a new conditional format rule at the given index. All subsequent rules'
|
|
|
|
# indexes are incremented.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `addConditionalFormatRule`
|
|
|
|
# @return [Google::Apis::SheetsV4::AddConditionalFormatRuleRequest]
|
|
|
|
attr_accessor :add_conditional_format_rule
|
|
|
|
|
2020-08-28 00:38:58 +00:00
|
|
|
# Adds a data source. After the data source is added successfully, an associated
|
2020-09-29 00:38:39 +00:00
|
|
|
# DATA_SOURCE sheet is created and an execution is triggered to refresh the
|
|
|
|
# sheet to read data from the data source. The request requires an additional `
|
|
|
|
# bigquery.readonly` OAuth scope.
|
2020-08-28 00:38:58 +00:00
|
|
|
# Corresponds to the JSON property `addDataSource`
|
|
|
|
# @return [Google::Apis::SheetsV4::AddDataSourceRequest]
|
|
|
|
attr_accessor :add_data_source
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# Creates a group over the specified range. If the requested range is a superset
|
|
|
|
# of the range of an existing group G, then the depth of G is incremented and
|
|
|
|
# this new group G' has the depth of that group. For example, a group [C:D,
|
|
|
|
# depth 1] + [B:E] results in groups [B:E, depth 1] and [C:D, depth 2]. If the
|
|
|
|
# requested range is a subset of the range of an existing group G, then the
|
|
|
|
# depth of the new group G' becomes one greater than the depth of G. For example,
|
|
|
|
# a group [B:E, depth 1] + [C:D] results in groups [B:E, depth 1] and [C:D,
|
|
|
|
# depth 2]. If the requested range starts before and ends within, or starts
|
|
|
|
# within and ends after, the range of an existing group G, then the range of the
|
|
|
|
# existing group G becomes the union of the ranges, and the new group G' has
|
2018-05-08 00:35:49 +00:00
|
|
|
# depth one greater than the depth of G and range as the intersection of the
|
|
|
|
# ranges. For example, a group [B:D, depth 1] + [C:E] results in groups [B:E,
|
|
|
|
# depth 1] and [C:D, depth 2].
|
|
|
|
# Corresponds to the JSON property `addDimensionGroup`
|
|
|
|
# @return [Google::Apis::SheetsV4::AddDimensionGroupRequest]
|
|
|
|
attr_accessor :add_dimension_group
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Adds a filter view.
|
|
|
|
# Corresponds to the JSON property `addFilterView`
|
|
|
|
# @return [Google::Apis::SheetsV4::AddFilterViewRequest]
|
|
|
|
attr_accessor :add_filter_view
|
|
|
|
|
|
|
|
# Adds a named range to the spreadsheet.
|
|
|
|
# Corresponds to the JSON property `addNamedRange`
|
|
|
|
# @return [Google::Apis::SheetsV4::AddNamedRangeRequest]
|
|
|
|
attr_accessor :add_named_range
|
|
|
|
|
|
|
|
# Adds a new protected range.
|
|
|
|
# Corresponds to the JSON property `addProtectedRange`
|
|
|
|
# @return [Google::Apis::SheetsV4::AddProtectedRangeRequest]
|
|
|
|
attr_accessor :add_protected_range
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# Adds a new sheet. When a sheet is added at a given index, all subsequent
|
|
|
|
# sheets' indexes are incremented. To add an object sheet, use AddChartRequest
|
|
|
|
# instead and specify EmbeddedObjectPosition.sheetId or EmbeddedObjectPosition.
|
|
|
|
# newSheet.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `addSheet`
|
|
|
|
# @return [Google::Apis::SheetsV4::AddSheetRequest]
|
|
|
|
attr_accessor :add_sheet
|
|
|
|
|
2019-11-05 00:36:31 +00:00
|
|
|
# Adds a slicer to a sheet in the spreadsheet.
|
|
|
|
# Corresponds to the JSON property `addSlicer`
|
|
|
|
# @return [Google::Apis::SheetsV4::AddSlicerRequest]
|
|
|
|
attr_accessor :add_slicer
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# Adds new cells after the last row with data in a sheet, inserting new rows
|
|
|
|
# into the sheet if necessary.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `appendCells`
|
|
|
|
# @return [Google::Apis::SheetsV4::AppendCellsRequest]
|
|
|
|
attr_accessor :append_cells
|
|
|
|
|
|
|
|
# Appends rows or columns to the end of a sheet.
|
|
|
|
# Corresponds to the JSON property `appendDimension`
|
|
|
|
# @return [Google::Apis::SheetsV4::AppendDimensionRequest]
|
|
|
|
attr_accessor :append_dimension
|
|
|
|
|
|
|
|
# Fills in more data based on existing data.
|
|
|
|
# Corresponds to the JSON property `autoFill`
|
|
|
|
# @return [Google::Apis::SheetsV4::AutoFillRequest]
|
|
|
|
attr_accessor :auto_fill
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# Automatically resizes one or more dimensions based on the contents of the
|
|
|
|
# cells in that dimension.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `autoResizeDimensions`
|
|
|
|
# @return [Google::Apis::SheetsV4::AutoResizeDimensionsRequest]
|
|
|
|
attr_accessor :auto_resize_dimensions
|
|
|
|
|
|
|
|
# Clears the basic filter, if any exists on the sheet.
|
|
|
|
# Corresponds to the JSON property `clearBasicFilter`
|
|
|
|
# @return [Google::Apis::SheetsV4::ClearBasicFilterRequest]
|
|
|
|
attr_accessor :clear_basic_filter
|
|
|
|
|
|
|
|
# Copies data from the source to the destination.
|
|
|
|
# Corresponds to the JSON property `copyPaste`
|
|
|
|
# @return [Google::Apis::SheetsV4::CopyPasteRequest]
|
|
|
|
attr_accessor :copy_paste
|
|
|
|
|
2017-09-20 00:35:54 +00:00
|
|
|
# A request to create developer metadata.
|
|
|
|
# Corresponds to the JSON property `createDeveloperMetadata`
|
|
|
|
# @return [Google::Apis::SheetsV4::CreateDeveloperMetadataRequest]
|
|
|
|
attr_accessor :create_developer_metadata
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Moves data from the source to the destination.
|
|
|
|
# Corresponds to the JSON property `cutPaste`
|
|
|
|
# @return [Google::Apis::SheetsV4::CutPasteRequest]
|
|
|
|
attr_accessor :cut_paste
|
|
|
|
|
|
|
|
# Removes the banded range with the given ID from the spreadsheet.
|
|
|
|
# Corresponds to the JSON property `deleteBanding`
|
|
|
|
# @return [Google::Apis::SheetsV4::DeleteBandingRequest]
|
|
|
|
attr_accessor :delete_banding
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# Deletes a conditional format rule at the given index. All subsequent rules'
|
|
|
|
# indexes are decremented.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `deleteConditionalFormatRule`
|
|
|
|
# @return [Google::Apis::SheetsV4::DeleteConditionalFormatRuleRequest]
|
|
|
|
attr_accessor :delete_conditional_format_rule
|
|
|
|
|
2020-08-28 00:38:58 +00:00
|
|
|
# Deletes a data source. The request also deletes the associated data source
|
|
|
|
# sheet, and unlinks all associated data source objects.
|
|
|
|
# Corresponds to the JSON property `deleteDataSource`
|
|
|
|
# @return [Google::Apis::SheetsV4::DeleteDataSourceRequest]
|
|
|
|
attr_accessor :delete_data_source
|
|
|
|
|
2017-09-20 00:35:54 +00:00
|
|
|
# A request to delete developer metadata.
|
|
|
|
# Corresponds to the JSON property `deleteDeveloperMetadata`
|
|
|
|
# @return [Google::Apis::SheetsV4::DeleteDeveloperMetadataRequest]
|
|
|
|
attr_accessor :delete_developer_metadata
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Deletes the dimensions from the sheet.
|
|
|
|
# Corresponds to the JSON property `deleteDimension`
|
|
|
|
# @return [Google::Apis::SheetsV4::DeleteDimensionRequest]
|
|
|
|
attr_accessor :delete_dimension
|
|
|
|
|
2018-05-08 00:35:49 +00:00
|
|
|
# Deletes a group over the specified range by decrementing the depth of the
|
2020-08-18 00:38:22 +00:00
|
|
|
# dimensions in the range. For example, assume the sheet has a depth-1 group
|
|
|
|
# over B:E and a depth-2 group over C:D. Deleting a group over D:E leaves the
|
|
|
|
# sheet with a depth-1 group over B:D and a depth-2 group over C:C.
|
2018-05-08 00:35:49 +00:00
|
|
|
# Corresponds to the JSON property `deleteDimensionGroup`
|
|
|
|
# @return [Google::Apis::SheetsV4::DeleteDimensionGroupRequest]
|
|
|
|
attr_accessor :delete_dimension_group
|
|
|
|
|
2019-08-15 00:37:46 +00:00
|
|
|
# Removes rows within this range that contain values in the specified columns
|
|
|
|
# that are duplicates of values in any previous row. Rows with identical values
|
|
|
|
# but different letter cases, formatting, or formulas are considered to be
|
2020-08-18 00:38:22 +00:00
|
|
|
# duplicates. This request also removes duplicate rows hidden from view (for
|
|
|
|
# example, due to a filter). When removing duplicates, the first instance of
|
|
|
|
# each duplicate row scanning from the top downwards is kept in the resulting
|
|
|
|
# range. Content outside of the specified range isn't removed, and rows
|
|
|
|
# considered duplicates do not have to be adjacent to each other in the range.
|
2019-07-23 00:37:37 +00:00
|
|
|
# Corresponds to the JSON property `deleteDuplicates`
|
|
|
|
# @return [Google::Apis::SheetsV4::DeleteDuplicatesRequest]
|
|
|
|
attr_accessor :delete_duplicates
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Deletes the embedded object with the given ID.
|
|
|
|
# Corresponds to the JSON property `deleteEmbeddedObject`
|
|
|
|
# @return [Google::Apis::SheetsV4::DeleteEmbeddedObjectRequest]
|
|
|
|
attr_accessor :delete_embedded_object
|
|
|
|
|
|
|
|
# Deletes a particular filter view.
|
|
|
|
# Corresponds to the JSON property `deleteFilterView`
|
|
|
|
# @return [Google::Apis::SheetsV4::DeleteFilterViewRequest]
|
|
|
|
attr_accessor :delete_filter_view
|
|
|
|
|
|
|
|
# Removes the named range with the given ID from the spreadsheet.
|
|
|
|
# Corresponds to the JSON property `deleteNamedRange`
|
|
|
|
# @return [Google::Apis::SheetsV4::DeleteNamedRangeRequest]
|
|
|
|
attr_accessor :delete_named_range
|
|
|
|
|
|
|
|
# Deletes the protected range with the given ID.
|
|
|
|
# Corresponds to the JSON property `deleteProtectedRange`
|
|
|
|
# @return [Google::Apis::SheetsV4::DeleteProtectedRangeRequest]
|
|
|
|
attr_accessor :delete_protected_range
|
|
|
|
|
|
|
|
# Deletes a range of cells, shifting other cells into the deleted area.
|
|
|
|
# Corresponds to the JSON property `deleteRange`
|
|
|
|
# @return [Google::Apis::SheetsV4::DeleteRangeRequest]
|
|
|
|
attr_accessor :delete_range
|
|
|
|
|
|
|
|
# Deletes the requested sheet.
|
|
|
|
# Corresponds to the JSON property `deleteSheet`
|
|
|
|
# @return [Google::Apis::SheetsV4::DeleteSheetRequest]
|
|
|
|
attr_accessor :delete_sheet
|
|
|
|
|
|
|
|
# Duplicates a particular filter view.
|
|
|
|
# Corresponds to the JSON property `duplicateFilterView`
|
|
|
|
# @return [Google::Apis::SheetsV4::DuplicateFilterViewRequest]
|
|
|
|
attr_accessor :duplicate_filter_view
|
|
|
|
|
|
|
|
# Duplicates the contents of a sheet.
|
|
|
|
# Corresponds to the JSON property `duplicateSheet`
|
|
|
|
# @return [Google::Apis::SheetsV4::DuplicateSheetRequest]
|
|
|
|
attr_accessor :duplicate_sheet
|
|
|
|
|
|
|
|
# Finds and replaces data in cells over a range, sheet, or all sheets.
|
|
|
|
# Corresponds to the JSON property `findReplace`
|
|
|
|
# @return [Google::Apis::SheetsV4::FindReplaceRequest]
|
|
|
|
attr_accessor :find_replace
|
|
|
|
|
|
|
|
# Inserts rows or columns in a sheet at a particular index.
|
|
|
|
# Corresponds to the JSON property `insertDimension`
|
|
|
|
# @return [Google::Apis::SheetsV4::InsertDimensionRequest]
|
|
|
|
attr_accessor :insert_dimension
|
|
|
|
|
|
|
|
# Inserts cells into a range, shifting the existing cells over or down.
|
|
|
|
# Corresponds to the JSON property `insertRange`
|
|
|
|
# @return [Google::Apis::SheetsV4::InsertRangeRequest]
|
|
|
|
attr_accessor :insert_range
|
|
|
|
|
|
|
|
# Merges all cells in the range.
|
|
|
|
# Corresponds to the JSON property `mergeCells`
|
|
|
|
# @return [Google::Apis::SheetsV4::MergeCellsRequest]
|
|
|
|
attr_accessor :merge_cells
|
|
|
|
|
|
|
|
# Moves one or more rows or columns.
|
|
|
|
# Corresponds to the JSON property `moveDimension`
|
|
|
|
# @return [Google::Apis::SheetsV4::MoveDimensionRequest]
|
|
|
|
attr_accessor :move_dimension
|
|
|
|
|
|
|
|
# Inserts data into the spreadsheet starting at the specified coordinate.
|
|
|
|
# Corresponds to the JSON property `pasteData`
|
|
|
|
# @return [Google::Apis::SheetsV4::PasteDataRequest]
|
|
|
|
attr_accessor :paste_data
|
|
|
|
|
|
|
|
# Randomizes the order of the rows in a range.
|
|
|
|
# Corresponds to the JSON property `randomizeRange`
|
|
|
|
# @return [Google::Apis::SheetsV4::RandomizeRangeRequest]
|
|
|
|
attr_accessor :randomize_range
|
|
|
|
|
2020-08-28 00:38:58 +00:00
|
|
|
# Refreshes one or multiple data source objects in the spreadsheet by the
|
2020-09-29 00:38:39 +00:00
|
|
|
# specified references. The request requires an additional `bigquery.readonly`
|
|
|
|
# OAuth scope. If there are multiple refresh requests referencing the same data
|
2020-08-28 00:38:58 +00:00
|
|
|
# source objects in one batch, only the last refresh request is processed, and
|
|
|
|
# all those requests will have the same response accordingly.
|
|
|
|
# Corresponds to the JSON property `refreshDataSource`
|
|
|
|
# @return [Google::Apis::SheetsV4::RefreshDataSourceRequest]
|
|
|
|
attr_accessor :refresh_data_source
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# Updates all cells in the range to the values in the given Cell object. Only
|
|
|
|
# the fields listed in the fields field are updated; others are unchanged. 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, use the formula `=
|
|
|
|
# $A$1` to prevent both the row and the column from incrementing.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `repeatCell`
|
|
|
|
# @return [Google::Apis::SheetsV4::RepeatCellRequest]
|
|
|
|
attr_accessor :repeat_cell
|
|
|
|
|
|
|
|
# Sets the basic filter associated with a sheet.
|
|
|
|
# Corresponds to the JSON property `setBasicFilter`
|
|
|
|
# @return [Google::Apis::SheetsV4::SetBasicFilterRequest]
|
|
|
|
attr_accessor :set_basic_filter
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# Sets a data validation rule to every cell in the range. To clear validation in
|
|
|
|
# a range, call this with no rule specified.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `setDataValidation`
|
|
|
|
# @return [Google::Apis::SheetsV4::SetDataValidationRequest]
|
|
|
|
attr_accessor :set_data_validation
|
|
|
|
|
|
|
|
# Sorts data in rows based on a sort order per column.
|
|
|
|
# Corresponds to the JSON property `sortRange`
|
|
|
|
# @return [Google::Apis::SheetsV4::SortRangeRequest]
|
|
|
|
attr_accessor :sort_range
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# Splits a column of text into multiple columns, based on a delimiter in each
|
|
|
|
# cell.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `textToColumns`
|
|
|
|
# @return [Google::Apis::SheetsV4::TextToColumnsRequest]
|
|
|
|
attr_accessor :text_to_columns
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# Trims the whitespace (such as spaces, tabs, or new lines) in every cell in the
|
|
|
|
# specified range. This request removes all whitespace from the start and end of
|
|
|
|
# each cell's text, and reduces any subsequence of remaining whitespace
|
2019-07-23 00:37:37 +00:00
|
|
|
# characters to a single space. If the resulting trimmed text starts with a '+'
|
2020-08-18 00:38:22 +00:00
|
|
|
# or '=' character, the text remains as a string value and isn't interpreted as
|
|
|
|
# a formula.
|
2019-07-23 00:37:37 +00:00
|
|
|
# Corresponds to the JSON property `trimWhitespace`
|
|
|
|
# @return [Google::Apis::SheetsV4::TrimWhitespaceRequest]
|
|
|
|
attr_accessor :trim_whitespace
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Unmerges cells in the given range.
|
|
|
|
# Corresponds to the JSON property `unmergeCells`
|
|
|
|
# @return [Google::Apis::SheetsV4::UnmergeCellsRequest]
|
|
|
|
attr_accessor :unmerge_cells
|
|
|
|
|
|
|
|
# Updates properties of the supplied banded range.
|
|
|
|
# Corresponds to the JSON property `updateBanding`
|
|
|
|
# @return [Google::Apis::SheetsV4::UpdateBandingRequest]
|
|
|
|
attr_accessor :update_banding
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# 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
|
|
|
|
# UpdateBordersRequest: 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.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `updateBorders`
|
|
|
|
# @return [Google::Apis::SheetsV4::UpdateBordersRequest]
|
|
|
|
attr_accessor :update_borders
|
|
|
|
|
|
|
|
# Updates all cells in a range with new data.
|
|
|
|
# Corresponds to the JSON property `updateCells`
|
|
|
|
# @return [Google::Apis::SheetsV4::UpdateCellsRequest]
|
|
|
|
attr_accessor :update_cells
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# Updates a chart's specifications. (This does not move or resize a chart. To
|
|
|
|
# move or resize a chart, use UpdateEmbeddedObjectPositionRequest.)
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `updateChartSpec`
|
|
|
|
# @return [Google::Apis::SheetsV4::UpdateChartSpecRequest]
|
|
|
|
attr_accessor :update_chart_spec
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# Updates a conditional format rule at the given index, or moves a conditional
|
|
|
|
# format rule to another index.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `updateConditionalFormatRule`
|
|
|
|
# @return [Google::Apis::SheetsV4::UpdateConditionalFormatRuleRequest]
|
|
|
|
attr_accessor :update_conditional_format_rule
|
|
|
|
|
2020-08-28 00:38:58 +00:00
|
|
|
# Updates a data source. After the data source is updated successfully, an
|
2020-09-29 00:38:39 +00:00
|
|
|
# execution is triggered to refresh the associated DATA_SOURCE sheet to read
|
|
|
|
# data from the updated data source. The request requires an additional `
|
|
|
|
# bigquery.readonly` OAuth scope.
|
2020-08-28 00:38:58 +00:00
|
|
|
# Corresponds to the JSON property `updateDataSource`
|
|
|
|
# @return [Google::Apis::SheetsV4::UpdateDataSourceRequest]
|
|
|
|
attr_accessor :update_data_source
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# A request to update properties of developer metadata. Updates the properties
|
|
|
|
# of the developer metadata selected by the filters to the values provided in
|
|
|
|
# the DeveloperMetadata resource. Callers must specify the properties they wish
|
|
|
|
# to update in the fields parameter, as well as specify at least one DataFilter
|
|
|
|
# matching the metadata they wish to update.
|
2017-09-20 00:35:54 +00:00
|
|
|
# Corresponds to the JSON property `updateDeveloperMetadata`
|
|
|
|
# @return [Google::Apis::SheetsV4::UpdateDeveloperMetadataRequest]
|
|
|
|
attr_accessor :update_developer_metadata
|
|
|
|
|
2018-05-08 00:35:49 +00:00
|
|
|
# Updates the state of the specified group.
|
|
|
|
# Corresponds to the JSON property `updateDimensionGroup`
|
|
|
|
# @return [Google::Apis::SheetsV4::UpdateDimensionGroupRequest]
|
|
|
|
attr_accessor :update_dimension_group
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Updates properties of dimensions within the specified range.
|
|
|
|
# Corresponds to the JSON property `updateDimensionProperties`
|
|
|
|
# @return [Google::Apis::SheetsV4::UpdateDimensionPropertiesRequest]
|
|
|
|
attr_accessor :update_dimension_properties
|
2017-06-14 17:02:03 +00:00
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# Update an embedded object's position (such as a moving or resizing a chart or
|
|
|
|
# image).
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `updateEmbeddedObjectPosition`
|
|
|
|
# @return [Google::Apis::SheetsV4::UpdateEmbeddedObjectPositionRequest]
|
|
|
|
attr_accessor :update_embedded_object_position
|
2017-06-14 17:02:03 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Updates properties of the filter view.
|
|
|
|
# Corresponds to the JSON property `updateFilterView`
|
|
|
|
# @return [Google::Apis::SheetsV4::UpdateFilterViewRequest]
|
|
|
|
attr_accessor :update_filter_view
|
2017-06-14 17:02:03 +00:00
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# Updates properties of the named range with the specified namedRangeId.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `updateNamedRange`
|
|
|
|
# @return [Google::Apis::SheetsV4::UpdateNamedRangeRequest]
|
|
|
|
attr_accessor :update_named_range
|
2017-05-04 19:35:56 +00:00
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# Updates an existing protected range with the specified protectedRangeId.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `updateProtectedRange`
|
|
|
|
# @return [Google::Apis::SheetsV4::UpdateProtectedRangeRequest]
|
|
|
|
attr_accessor :update_protected_range
|
2017-05-04 19:35:56 +00:00
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# Updates properties of the sheet with the specified sheetId.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `updateSheetProperties`
|
|
|
|
# @return [Google::Apis::SheetsV4::UpdateSheetPropertiesRequest]
|
|
|
|
attr_accessor :update_sheet_properties
|
2017-05-04 19:35:56 +00:00
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# Updates a slicer's specifications. (This does not move or resize a slicer. To
|
|
|
|
# move or resize a slicer use UpdateEmbeddedObjectPositionRequest.
|
2019-11-05 00:36:31 +00:00
|
|
|
# Corresponds to the JSON property `updateSlicerSpec`
|
|
|
|
# @return [Google::Apis::SheetsV4::UpdateSlicerSpecRequest]
|
|
|
|
attr_accessor :update_slicer_spec
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Updates properties of a spreadsheet.
|
|
|
|
# Corresponds to the JSON property `updateSpreadsheetProperties`
|
|
|
|
# @return [Google::Apis::SheetsV4::UpdateSpreadsheetPropertiesRequest]
|
|
|
|
attr_accessor :update_spreadsheet_properties
|
2017-06-02 06:11:31 +00:00
|
|
|
|
2017-05-04 19:35:56 +00:00
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@add_banding = args[:add_banding] if args.key?(:add_banding)
|
|
|
|
@add_chart = args[:add_chart] if args.key?(:add_chart)
|
|
|
|
@add_conditional_format_rule = args[:add_conditional_format_rule] if args.key?(:add_conditional_format_rule)
|
2020-08-28 00:38:58 +00:00
|
|
|
@add_data_source = args[:add_data_source] if args.key?(:add_data_source)
|
2018-05-08 00:35:49 +00:00
|
|
|
@add_dimension_group = args[:add_dimension_group] if args.key?(:add_dimension_group)
|
2017-08-25 19:54:22 +00:00
|
|
|
@add_filter_view = args[:add_filter_view] if args.key?(:add_filter_view)
|
|
|
|
@add_named_range = args[:add_named_range] if args.key?(:add_named_range)
|
|
|
|
@add_protected_range = args[:add_protected_range] if args.key?(:add_protected_range)
|
|
|
|
@add_sheet = args[:add_sheet] if args.key?(:add_sheet)
|
2019-11-05 00:36:31 +00:00
|
|
|
@add_slicer = args[:add_slicer] if args.key?(:add_slicer)
|
2017-08-25 19:54:22 +00:00
|
|
|
@append_cells = args[:append_cells] if args.key?(:append_cells)
|
|
|
|
@append_dimension = args[:append_dimension] if args.key?(:append_dimension)
|
|
|
|
@auto_fill = args[:auto_fill] if args.key?(:auto_fill)
|
|
|
|
@auto_resize_dimensions = args[:auto_resize_dimensions] if args.key?(:auto_resize_dimensions)
|
|
|
|
@clear_basic_filter = args[:clear_basic_filter] if args.key?(:clear_basic_filter)
|
|
|
|
@copy_paste = args[:copy_paste] if args.key?(:copy_paste)
|
2017-09-20 00:35:54 +00:00
|
|
|
@create_developer_metadata = args[:create_developer_metadata] if args.key?(:create_developer_metadata)
|
2017-08-25 19:54:22 +00:00
|
|
|
@cut_paste = args[:cut_paste] if args.key?(:cut_paste)
|
|
|
|
@delete_banding = args[:delete_banding] if args.key?(:delete_banding)
|
|
|
|
@delete_conditional_format_rule = args[:delete_conditional_format_rule] if args.key?(:delete_conditional_format_rule)
|
2020-08-28 00:38:58 +00:00
|
|
|
@delete_data_source = args[:delete_data_source] if args.key?(:delete_data_source)
|
2017-09-20 00:35:54 +00:00
|
|
|
@delete_developer_metadata = args[:delete_developer_metadata] if args.key?(:delete_developer_metadata)
|
2017-08-25 19:54:22 +00:00
|
|
|
@delete_dimension = args[:delete_dimension] if args.key?(:delete_dimension)
|
2018-05-08 00:35:49 +00:00
|
|
|
@delete_dimension_group = args[:delete_dimension_group] if args.key?(:delete_dimension_group)
|
2019-07-23 00:37:37 +00:00
|
|
|
@delete_duplicates = args[:delete_duplicates] if args.key?(:delete_duplicates)
|
2017-08-25 19:54:22 +00:00
|
|
|
@delete_embedded_object = args[:delete_embedded_object] if args.key?(:delete_embedded_object)
|
|
|
|
@delete_filter_view = args[:delete_filter_view] if args.key?(:delete_filter_view)
|
|
|
|
@delete_named_range = args[:delete_named_range] if args.key?(:delete_named_range)
|
|
|
|
@delete_protected_range = args[:delete_protected_range] if args.key?(:delete_protected_range)
|
|
|
|
@delete_range = args[:delete_range] if args.key?(:delete_range)
|
|
|
|
@delete_sheet = args[:delete_sheet] if args.key?(:delete_sheet)
|
|
|
|
@duplicate_filter_view = args[:duplicate_filter_view] if args.key?(:duplicate_filter_view)
|
|
|
|
@duplicate_sheet = args[:duplicate_sheet] if args.key?(:duplicate_sheet)
|
|
|
|
@find_replace = args[:find_replace] if args.key?(:find_replace)
|
|
|
|
@insert_dimension = args[:insert_dimension] if args.key?(:insert_dimension)
|
|
|
|
@insert_range = args[:insert_range] if args.key?(:insert_range)
|
|
|
|
@merge_cells = args[:merge_cells] if args.key?(:merge_cells)
|
|
|
|
@move_dimension = args[:move_dimension] if args.key?(:move_dimension)
|
|
|
|
@paste_data = args[:paste_data] if args.key?(:paste_data)
|
|
|
|
@randomize_range = args[:randomize_range] if args.key?(:randomize_range)
|
2020-08-28 00:38:58 +00:00
|
|
|
@refresh_data_source = args[:refresh_data_source] if args.key?(:refresh_data_source)
|
2017-08-25 19:54:22 +00:00
|
|
|
@repeat_cell = args[:repeat_cell] if args.key?(:repeat_cell)
|
|
|
|
@set_basic_filter = args[:set_basic_filter] if args.key?(:set_basic_filter)
|
|
|
|
@set_data_validation = args[:set_data_validation] if args.key?(:set_data_validation)
|
|
|
|
@sort_range = args[:sort_range] if args.key?(:sort_range)
|
|
|
|
@text_to_columns = args[:text_to_columns] if args.key?(:text_to_columns)
|
2019-07-23 00:37:37 +00:00
|
|
|
@trim_whitespace = args[:trim_whitespace] if args.key?(:trim_whitespace)
|
2017-08-25 19:54:22 +00:00
|
|
|
@unmerge_cells = args[:unmerge_cells] if args.key?(:unmerge_cells)
|
|
|
|
@update_banding = args[:update_banding] if args.key?(:update_banding)
|
|
|
|
@update_borders = args[:update_borders] if args.key?(:update_borders)
|
|
|
|
@update_cells = args[:update_cells] if args.key?(:update_cells)
|
|
|
|
@update_chart_spec = args[:update_chart_spec] if args.key?(:update_chart_spec)
|
|
|
|
@update_conditional_format_rule = args[:update_conditional_format_rule] if args.key?(:update_conditional_format_rule)
|
2020-08-28 00:38:58 +00:00
|
|
|
@update_data_source = args[:update_data_source] if args.key?(:update_data_source)
|
2017-09-20 00:35:54 +00:00
|
|
|
@update_developer_metadata = args[:update_developer_metadata] if args.key?(:update_developer_metadata)
|
2018-05-08 00:35:49 +00:00
|
|
|
@update_dimension_group = args[:update_dimension_group] if args.key?(:update_dimension_group)
|
2017-08-25 19:54:22 +00:00
|
|
|
@update_dimension_properties = args[:update_dimension_properties] if args.key?(:update_dimension_properties)
|
|
|
|
@update_embedded_object_position = args[:update_embedded_object_position] if args.key?(:update_embedded_object_position)
|
|
|
|
@update_filter_view = args[:update_filter_view] if args.key?(:update_filter_view)
|
|
|
|
@update_named_range = args[:update_named_range] if args.key?(:update_named_range)
|
|
|
|
@update_protected_range = args[:update_protected_range] if args.key?(:update_protected_range)
|
|
|
|
@update_sheet_properties = args[:update_sheet_properties] if args.key?(:update_sheet_properties)
|
2019-11-05 00:36:31 +00:00
|
|
|
@update_slicer_spec = args[:update_slicer_spec] if args.key?(:update_slicer_spec)
|
2017-08-25 19:54:22 +00:00
|
|
|
@update_spreadsheet_properties = args[:update_spreadsheet_properties] if args.key?(:update_spreadsheet_properties)
|
2017-05-04 19:35:56 +00:00
|
|
|
end
|
|
|
|
end
|
2017-03-27 22:14:47 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# A single response from an update.
|
|
|
|
class Response
|
2017-06-14 17:02:03 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
2017-05-26 16:44:32 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The result of adding a banded range.
|
|
|
|
# Corresponds to the JSON property `addBanding`
|
|
|
|
# @return [Google::Apis::SheetsV4::AddBandingResponse]
|
|
|
|
attr_accessor :add_banding
|
2017-07-12 20:10:42 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The result of adding a chart to a spreadsheet.
|
|
|
|
# Corresponds to the JSON property `addChart`
|
|
|
|
# @return [Google::Apis::SheetsV4::AddChartResponse]
|
|
|
|
attr_accessor :add_chart
|
2017-07-12 20:10:42 +00:00
|
|
|
|
2020-08-28 00:38:58 +00:00
|
|
|
# The result of adding a data source.
|
|
|
|
# Corresponds to the JSON property `addDataSource`
|
|
|
|
# @return [Google::Apis::SheetsV4::AddDataSourceResponse]
|
|
|
|
attr_accessor :add_data_source
|
|
|
|
|
2018-05-08 00:35:49 +00:00
|
|
|
# The result of adding a group.
|
|
|
|
# Corresponds to the JSON property `addDimensionGroup`
|
|
|
|
# @return [Google::Apis::SheetsV4::AddDimensionGroupResponse]
|
|
|
|
attr_accessor :add_dimension_group
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The result of adding a filter view.
|
|
|
|
# Corresponds to the JSON property `addFilterView`
|
|
|
|
# @return [Google::Apis::SheetsV4::AddFilterViewResponse]
|
|
|
|
attr_accessor :add_filter_view
|
2017-04-03 20:18:48 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The result of adding a named range.
|
|
|
|
# Corresponds to the JSON property `addNamedRange`
|
|
|
|
# @return [Google::Apis::SheetsV4::AddNamedRangeResponse]
|
|
|
|
attr_accessor :add_named_range
|
2017-01-25 07:37:13 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The result of adding a new protected range.
|
|
|
|
# Corresponds to the JSON property `addProtectedRange`
|
|
|
|
# @return [Google::Apis::SheetsV4::AddProtectedRangeResponse]
|
|
|
|
attr_accessor :add_protected_range
|
2017-01-28 03:38:40 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The result of adding a sheet.
|
|
|
|
# Corresponds to the JSON property `addSheet`
|
|
|
|
# @return [Google::Apis::SheetsV4::AddSheetResponse]
|
|
|
|
attr_accessor :add_sheet
|
2017-02-13 23:28:52 +00:00
|
|
|
|
2019-11-05 00:36:31 +00:00
|
|
|
# The result of adding a slicer to a spreadsheet.
|
|
|
|
# Corresponds to the JSON property `addSlicer`
|
|
|
|
# @return [Google::Apis::SheetsV4::AddSlicerResponse]
|
|
|
|
attr_accessor :add_slicer
|
|
|
|
|
2017-09-20 00:35:54 +00:00
|
|
|
# The response from creating developer metadata.
|
|
|
|
# Corresponds to the JSON property `createDeveloperMetadata`
|
|
|
|
# @return [Google::Apis::SheetsV4::CreateDeveloperMetadataResponse]
|
|
|
|
attr_accessor :create_developer_metadata
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The result of deleting a conditional format rule.
|
|
|
|
# Corresponds to the JSON property `deleteConditionalFormatRule`
|
|
|
|
# @return [Google::Apis::SheetsV4::DeleteConditionalFormatRuleResponse]
|
|
|
|
attr_accessor :delete_conditional_format_rule
|
2017-06-02 06:11:31 +00:00
|
|
|
|
2017-09-20 00:35:54 +00:00
|
|
|
# The response from deleting developer metadata.
|
|
|
|
# Corresponds to the JSON property `deleteDeveloperMetadata`
|
|
|
|
# @return [Google::Apis::SheetsV4::DeleteDeveloperMetadataResponse]
|
|
|
|
attr_accessor :delete_developer_metadata
|
|
|
|
|
2018-05-08 00:35:49 +00:00
|
|
|
# The result of deleting a group.
|
|
|
|
# Corresponds to the JSON property `deleteDimensionGroup`
|
|
|
|
# @return [Google::Apis::SheetsV4::DeleteDimensionGroupResponse]
|
|
|
|
attr_accessor :delete_dimension_group
|
|
|
|
|
2019-07-23 00:37:37 +00:00
|
|
|
# The result of removing duplicates in a range.
|
|
|
|
# Corresponds to the JSON property `deleteDuplicates`
|
|
|
|
# @return [Google::Apis::SheetsV4::DeleteDuplicatesResponse]
|
|
|
|
attr_accessor :delete_duplicates
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The result of a filter view being duplicated.
|
|
|
|
# Corresponds to the JSON property `duplicateFilterView`
|
|
|
|
# @return [Google::Apis::SheetsV4::DuplicateFilterViewResponse]
|
|
|
|
attr_accessor :duplicate_filter_view
|
2017-06-14 17:02:03 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The result of duplicating a sheet.
|
|
|
|
# Corresponds to the JSON property `duplicateSheet`
|
|
|
|
# @return [Google::Apis::SheetsV4::DuplicateSheetResponse]
|
|
|
|
attr_accessor :duplicate_sheet
|
2017-06-02 06:11:31 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The result of the find/replace.
|
|
|
|
# Corresponds to the JSON property `findReplace`
|
|
|
|
# @return [Google::Apis::SheetsV4::FindReplaceResponse]
|
|
|
|
attr_accessor :find_replace
|
2017-06-02 06:11:31 +00:00
|
|
|
|
2020-08-28 00:38:58 +00:00
|
|
|
# The response from refreshing one or multiple data source objects.
|
|
|
|
# Corresponds to the JSON property `refreshDataSource`
|
|
|
|
# @return [Google::Apis::SheetsV4::RefreshDataSourceResponse]
|
|
|
|
attr_accessor :refresh_data_source
|
|
|
|
|
2019-07-23 00:37:37 +00:00
|
|
|
# The result of trimming whitespace in cells.
|
|
|
|
# Corresponds to the JSON property `trimWhitespace`
|
|
|
|
# @return [Google::Apis::SheetsV4::TrimWhitespaceResponse]
|
|
|
|
attr_accessor :trim_whitespace
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The result of updating a conditional format rule.
|
|
|
|
# Corresponds to the JSON property `updateConditionalFormatRule`
|
|
|
|
# @return [Google::Apis::SheetsV4::UpdateConditionalFormatRuleResponse]
|
|
|
|
attr_accessor :update_conditional_format_rule
|
2017-06-02 06:11:31 +00:00
|
|
|
|
2020-08-28 00:38:58 +00:00
|
|
|
# The response from updating data source.
|
|
|
|
# Corresponds to the JSON property `updateDataSource`
|
|
|
|
# @return [Google::Apis::SheetsV4::UpdateDataSourceResponse]
|
|
|
|
attr_accessor :update_data_source
|
|
|
|
|
2017-09-20 00:35:54 +00:00
|
|
|
# The response from updating developer metadata.
|
|
|
|
# Corresponds to the JSON property `updateDeveloperMetadata`
|
|
|
|
# @return [Google::Apis::SheetsV4::UpdateDeveloperMetadataResponse]
|
|
|
|
attr_accessor :update_developer_metadata
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The result of updating an embedded object's position.
|
|
|
|
# Corresponds to the JSON property `updateEmbeddedObjectPosition`
|
|
|
|
# @return [Google::Apis::SheetsV4::UpdateEmbeddedObjectPositionResponse]
|
|
|
|
attr_accessor :update_embedded_object_position
|
2017-01-25 07:37:13 +00:00
|
|
|
|
2017-06-14 17:02:03 +00:00
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
2017-01-25 07:37:13 +00:00
|
|
|
|
2017-06-14 17:02:03 +00:00
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@add_banding = args[:add_banding] if args.key?(:add_banding)
|
|
|
|
@add_chart = args[:add_chart] if args.key?(:add_chart)
|
2020-08-28 00:38:58 +00:00
|
|
|
@add_data_source = args[:add_data_source] if args.key?(:add_data_source)
|
2018-05-08 00:35:49 +00:00
|
|
|
@add_dimension_group = args[:add_dimension_group] if args.key?(:add_dimension_group)
|
2017-08-25 19:54:22 +00:00
|
|
|
@add_filter_view = args[:add_filter_view] if args.key?(:add_filter_view)
|
|
|
|
@add_named_range = args[:add_named_range] if args.key?(:add_named_range)
|
|
|
|
@add_protected_range = args[:add_protected_range] if args.key?(:add_protected_range)
|
|
|
|
@add_sheet = args[:add_sheet] if args.key?(:add_sheet)
|
2019-11-05 00:36:31 +00:00
|
|
|
@add_slicer = args[:add_slicer] if args.key?(:add_slicer)
|
2017-09-20 00:35:54 +00:00
|
|
|
@create_developer_metadata = args[:create_developer_metadata] if args.key?(:create_developer_metadata)
|
2017-08-25 19:54:22 +00:00
|
|
|
@delete_conditional_format_rule = args[:delete_conditional_format_rule] if args.key?(:delete_conditional_format_rule)
|
2017-09-20 00:35:54 +00:00
|
|
|
@delete_developer_metadata = args[:delete_developer_metadata] if args.key?(:delete_developer_metadata)
|
2018-05-08 00:35:49 +00:00
|
|
|
@delete_dimension_group = args[:delete_dimension_group] if args.key?(:delete_dimension_group)
|
2019-07-23 00:37:37 +00:00
|
|
|
@delete_duplicates = args[:delete_duplicates] if args.key?(:delete_duplicates)
|
2017-08-25 19:54:22 +00:00
|
|
|
@duplicate_filter_view = args[:duplicate_filter_view] if args.key?(:duplicate_filter_view)
|
|
|
|
@duplicate_sheet = args[:duplicate_sheet] if args.key?(:duplicate_sheet)
|
|
|
|
@find_replace = args[:find_replace] if args.key?(:find_replace)
|
2020-08-28 00:38:58 +00:00
|
|
|
@refresh_data_source = args[:refresh_data_source] if args.key?(:refresh_data_source)
|
2019-07-23 00:37:37 +00:00
|
|
|
@trim_whitespace = args[:trim_whitespace] if args.key?(:trim_whitespace)
|
2017-08-25 19:54:22 +00:00
|
|
|
@update_conditional_format_rule = args[:update_conditional_format_rule] if args.key?(:update_conditional_format_rule)
|
2020-08-28 00:38:58 +00:00
|
|
|
@update_data_source = args[:update_data_source] if args.key?(:update_data_source)
|
2017-09-20 00:35:54 +00:00
|
|
|
@update_developer_metadata = args[:update_developer_metadata] if args.key?(:update_developer_metadata)
|
2017-08-25 19:54:22 +00:00
|
|
|
@update_embedded_object_position = args[:update_embedded_object_position] if args.key?(:update_embedded_object_position)
|
2017-06-14 17:02:03 +00:00
|
|
|
end
|
|
|
|
end
|
2017-04-03 20:18:48 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Data about each cell in a row.
|
|
|
|
class RowData
|
2017-06-14 17:02:03 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
2017-04-03 20:18:48 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The values in the row, one per column.
|
|
|
|
# Corresponds to the JSON property `values`
|
|
|
|
# @return [Array<Google::Apis::SheetsV4::CellData>]
|
|
|
|
attr_accessor :values
|
2017-01-28 03:38:40 +00:00
|
|
|
|
2017-06-14 17:02:03 +00:00
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
2017-01-28 03:38:40 +00:00
|
|
|
|
2017-06-14 17:02:03 +00:00
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@values = args[:values] if args.key?(:values)
|
2017-06-14 17:02:03 +00:00
|
|
|
end
|
|
|
|
end
|
2017-03-30 22:30:51 +00:00
|
|
|
|
2019-10-09 00:37:55 +00:00
|
|
|
# A scorecard chart. Scorecard charts are used to highlight key performance
|
2020-08-18 00:38:22 +00:00
|
|
|
# indicators, known as KPIs, on the spreadsheet. A scorecard chart can represent
|
|
|
|
# things like total sales, average cost, or a top selling item. You can specify
|
|
|
|
# a single data value, or aggregate over a range of data. Percentage or absolute
|
|
|
|
# difference from a baseline value can be highlighted, like changes over time.
|
2019-10-09 00:37:55 +00:00
|
|
|
class ScorecardChartSpec
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The aggregation type for key and baseline chart data in scorecard chart. This
|
2020-09-29 00:38:39 +00:00
|
|
|
# field is not supported for data source charts. Use the ChartData.aggregateType
|
|
|
|
# field of the key_value_data or baseline_value_data instead for data source
|
|
|
|
# charts. This field is optional.
|
2019-10-09 00:37:55 +00:00
|
|
|
# Corresponds to the JSON property `aggregateType`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :aggregate_type
|
|
|
|
|
|
|
|
# The data included in a domain or series.
|
|
|
|
# Corresponds to the JSON property `baselineValueData`
|
|
|
|
# @return [Google::Apis::SheetsV4::ChartData]
|
|
|
|
attr_accessor :baseline_value_data
|
|
|
|
|
|
|
|
# Formatting options for baseline value.
|
|
|
|
# Corresponds to the JSON property `baselineValueFormat`
|
|
|
|
# @return [Google::Apis::SheetsV4::BaselineValueFormat]
|
|
|
|
attr_accessor :baseline_value_format
|
|
|
|
|
|
|
|
# Custom number formatting options for chart attributes.
|
|
|
|
# Corresponds to the JSON property `customFormatOptions`
|
|
|
|
# @return [Google::Apis::SheetsV4::ChartCustomNumberFormatOptions]
|
|
|
|
attr_accessor :custom_format_options
|
|
|
|
|
|
|
|
# The data included in a domain or series.
|
|
|
|
# Corresponds to the JSON property `keyValueData`
|
|
|
|
# @return [Google::Apis::SheetsV4::ChartData]
|
|
|
|
attr_accessor :key_value_data
|
|
|
|
|
|
|
|
# Formatting options for key value.
|
|
|
|
# Corresponds to the JSON property `keyValueFormat`
|
|
|
|
# @return [Google::Apis::SheetsV4::KeyValueFormat]
|
|
|
|
attr_accessor :key_value_format
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The number format source used in the scorecard chart. This field is optional.
|
2019-10-09 00:37:55 +00:00
|
|
|
# Corresponds to the JSON property `numberFormatSource`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :number_format_source
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# Value to scale scorecard key and baseline value. For example, a factor of 10
|
|
|
|
# can be used to divide all values in the chart by 10. This field is optional.
|
2019-10-09 00:37:55 +00:00
|
|
|
# Corresponds to the JSON property `scaleFactor`
|
|
|
|
# @return [Float]
|
|
|
|
attr_accessor :scale_factor
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@aggregate_type = args[:aggregate_type] if args.key?(:aggregate_type)
|
|
|
|
@baseline_value_data = args[:baseline_value_data] if args.key?(:baseline_value_data)
|
|
|
|
@baseline_value_format = args[:baseline_value_format] if args.key?(:baseline_value_format)
|
|
|
|
@custom_format_options = args[:custom_format_options] if args.key?(:custom_format_options)
|
|
|
|
@key_value_data = args[:key_value_data] if args.key?(:key_value_data)
|
|
|
|
@key_value_format = args[:key_value_format] if args.key?(:key_value_format)
|
|
|
|
@number_format_source = args[:number_format_source] if args.key?(:number_format_source)
|
|
|
|
@scale_factor = args[:scale_factor] if args.key?(:scale_factor)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-09-20 00:35:54 +00:00
|
|
|
# A request to retrieve all developer metadata matching the set of specified
|
|
|
|
# criteria.
|
|
|
|
class SearchDeveloperMetadataRequest
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
|
|
|
# The data filters describing the criteria used to determine which
|
2020-08-18 00:38:22 +00:00
|
|
|
# DeveloperMetadata entries to return. DeveloperMetadata matching any of the
|
2020-01-25 00:37:19 +00:00
|
|
|
# specified filters are included in the response.
|
2017-09-20 00:35:54 +00:00
|
|
|
# Corresponds to the JSON property `dataFilters`
|
|
|
|
# @return [Array<Google::Apis::SheetsV4::DataFilter>]
|
|
|
|
attr_accessor :data_filters
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@data_filters = args[:data_filters] if args.key?(:data_filters)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
# A reply to a developer metadata search request.
|
|
|
|
class SearchDeveloperMetadataResponse
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
|
|
|
# The metadata matching the criteria of the search request.
|
|
|
|
# Corresponds to the JSON property `matchedDeveloperMetadata`
|
|
|
|
# @return [Array<Google::Apis::SheetsV4::MatchedDeveloperMetadata>]
|
|
|
|
attr_accessor :matched_developer_metadata
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@matched_developer_metadata = args[:matched_developer_metadata] if args.key?(:matched_developer_metadata)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Sets the basic filter associated with a sheet.
|
|
|
|
class SetBasicFilterRequest
|
2017-06-14 17:02:03 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
2017-05-04 19:35:56 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The default filter associated with a sheet.
|
|
|
|
# Corresponds to the JSON property `filter`
|
|
|
|
# @return [Google::Apis::SheetsV4::BasicFilter]
|
|
|
|
attr_accessor :filter
|
2017-05-04 19:35:56 +00:00
|
|
|
|
2017-06-14 17:02:03 +00:00
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
2016-05-16 16:49:15 +00:00
|
|
|
|
2017-06-14 17:02:03 +00:00
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@filter = args[:filter] if args.key?(:filter)
|
2017-06-14 17:02:03 +00:00
|
|
|
end
|
|
|
|
end
|
2016-05-16 16:49:15 +00:00
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# Sets a data validation rule to every cell in the range. To clear validation in
|
|
|
|
# a range, call this with no rule specified.
|
2017-08-25 19:54:22 +00:00
|
|
|
class SetDataValidationRequest
|
2017-06-14 17:02:03 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
2016-05-16 16:49:15 +00:00
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# A range on a sheet. All indexes are zero-based. Indexes are half open, i.e.
|
|
|
|
# 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 sheet 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!`.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `range`
|
|
|
|
# @return [Google::Apis::SheetsV4::GridRange]
|
|
|
|
attr_accessor :range
|
|
|
|
|
|
|
|
# A data validation rule.
|
|
|
|
# Corresponds to the JSON property `rule`
|
|
|
|
# @return [Google::Apis::SheetsV4::DataValidationRule]
|
|
|
|
attr_accessor :rule
|
2016-05-16 16:49:15 +00:00
|
|
|
|
2017-06-14 17:02:03 +00:00
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
2016-05-16 16:49:15 +00:00
|
|
|
|
2017-06-14 17:02:03 +00:00
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@range = args[:range] if args.key?(:range)
|
|
|
|
@rule = args[:rule] if args.key?(:rule)
|
2017-06-14 17:02:03 +00:00
|
|
|
end
|
|
|
|
end
|
2017-01-28 03:38:40 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# A sheet in a spreadsheet.
|
|
|
|
class Sheet
|
2017-06-14 17:02:03 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
2017-05-04 19:35:56 +00:00
|
|
|
|
2018-05-23 00:36:42 +00:00
|
|
|
# The banded (alternating colors) ranges on this sheet.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `bandedRanges`
|
|
|
|
# @return [Array<Google::Apis::SheetsV4::BandedRange>]
|
|
|
|
attr_accessor :banded_ranges
|
2016-11-08 23:43:14 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The default filter associated with a sheet.
|
|
|
|
# Corresponds to the JSON property `basicFilter`
|
|
|
|
# @return [Google::Apis::SheetsV4::BasicFilter]
|
|
|
|
attr_accessor :basic_filter
|
2016-05-16 16:49:15 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The specifications of every chart on this sheet.
|
|
|
|
# Corresponds to the JSON property `charts`
|
|
|
|
# @return [Array<Google::Apis::SheetsV4::EmbeddedChart>]
|
|
|
|
attr_accessor :charts
|
2017-01-25 07:37:13 +00:00
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# All column groups on this sheet, ordered by increasing range start index, then
|
|
|
|
# by group depth.
|
2018-05-08 00:35:49 +00:00
|
|
|
# Corresponds to the JSON property `columnGroups`
|
|
|
|
# @return [Array<Google::Apis::SheetsV4::DimensionGroup>]
|
|
|
|
attr_accessor :column_groups
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The conditional format rules in this sheet.
|
|
|
|
# Corresponds to the JSON property `conditionalFormats`
|
|
|
|
# @return [Array<Google::Apis::SheetsV4::ConditionalFormatRule>]
|
|
|
|
attr_accessor :conditional_formats
|
2017-03-31 19:53:27 +00:00
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# 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
|
2020-09-29 00:38:39 +00:00
|
|
|
# 14` (zero-based row 15), and `startColumn 3` (zero-based column D). For a
|
|
|
|
# DATA_SOURCE sheet, you can not request a specific range, the GridData contains
|
|
|
|
# all the values.
|
2017-07-12 20:10:42 +00:00
|
|
|
# Corresponds to the JSON property `data`
|
2017-08-25 19:54:22 +00:00
|
|
|
# @return [Array<Google::Apis::SheetsV4::GridData>]
|
2017-07-12 20:10:42 +00:00
|
|
|
attr_accessor :data
|
|
|
|
|
2017-09-20 00:35:54 +00:00
|
|
|
# The developer metadata associated with a sheet.
|
|
|
|
# Corresponds to the JSON property `developerMetadata`
|
|
|
|
# @return [Array<Google::Apis::SheetsV4::DeveloperMetadata>]
|
|
|
|
attr_accessor :developer_metadata
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The filter views in this sheet.
|
|
|
|
# Corresponds to the JSON property `filterViews`
|
|
|
|
# @return [Array<Google::Apis::SheetsV4::FilterView>]
|
|
|
|
attr_accessor :filter_views
|
|
|
|
|
|
|
|
# The ranges that are merged together.
|
|
|
|
# Corresponds to the JSON property `merges`
|
|
|
|
# @return [Array<Google::Apis::SheetsV4::GridRange>]
|
|
|
|
attr_accessor :merges
|
|
|
|
|
|
|
|
# Properties of a sheet.
|
|
|
|
# Corresponds to the JSON property `properties`
|
|
|
|
# @return [Google::Apis::SheetsV4::SheetProperties]
|
|
|
|
attr_accessor :properties
|
|
|
|
|
|
|
|
# The protected ranges in this sheet.
|
|
|
|
# Corresponds to the JSON property `protectedRanges`
|
|
|
|
# @return [Array<Google::Apis::SheetsV4::ProtectedRange>]
|
|
|
|
attr_accessor :protected_ranges
|
2017-06-02 06:11:31 +00:00
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# All row groups on this sheet, ordered by increasing range start index, then by
|
|
|
|
# group depth.
|
2018-05-08 00:35:49 +00:00
|
|
|
# Corresponds to the JSON property `rowGroups`
|
|
|
|
# @return [Array<Google::Apis::SheetsV4::DimensionGroup>]
|
|
|
|
attr_accessor :row_groups
|
|
|
|
|
2019-11-05 00:36:31 +00:00
|
|
|
# The slicers on this sheet.
|
|
|
|
# Corresponds to the JSON property `slicers`
|
|
|
|
# @return [Array<Google::Apis::SheetsV4::Slicer>]
|
|
|
|
attr_accessor :slicers
|
|
|
|
|
2017-06-14 17:02:03 +00:00
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
2017-03-31 19:53:27 +00:00
|
|
|
|
2017-06-14 17:02:03 +00:00
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@banded_ranges = args[:banded_ranges] if args.key?(:banded_ranges)
|
|
|
|
@basic_filter = args[:basic_filter] if args.key?(:basic_filter)
|
|
|
|
@charts = args[:charts] if args.key?(:charts)
|
2018-05-08 00:35:49 +00:00
|
|
|
@column_groups = args[:column_groups] if args.key?(:column_groups)
|
2017-08-25 19:54:22 +00:00
|
|
|
@conditional_formats = args[:conditional_formats] if args.key?(:conditional_formats)
|
2017-07-12 20:10:42 +00:00
|
|
|
@data = args[:data] if args.key?(:data)
|
2017-09-20 00:35:54 +00:00
|
|
|
@developer_metadata = args[:developer_metadata] if args.key?(:developer_metadata)
|
2017-08-25 19:54:22 +00:00
|
|
|
@filter_views = args[:filter_views] if args.key?(:filter_views)
|
|
|
|
@merges = args[:merges] if args.key?(:merges)
|
|
|
|
@properties = args[:properties] if args.key?(:properties)
|
|
|
|
@protected_ranges = args[:protected_ranges] if args.key?(:protected_ranges)
|
2018-05-08 00:35:49 +00:00
|
|
|
@row_groups = args[:row_groups] if args.key?(:row_groups)
|
2019-11-05 00:36:31 +00:00
|
|
|
@slicers = args[:slicers] if args.key?(:slicers)
|
2017-06-14 17:02:03 +00:00
|
|
|
end
|
|
|
|
end
|
2017-04-03 20:18:48 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Properties of a sheet.
|
|
|
|
class SheetProperties
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2020-09-29 00:38:39 +00:00
|
|
|
# Additional properties of a DATA_SOURCE sheet.
|
2020-08-28 00:38:58 +00:00
|
|
|
# Corresponds to the JSON property `dataSourceSheetProperties`
|
|
|
|
# @return [Google::Apis::SheetsV4::DataSourceSheetProperties]
|
|
|
|
attr_accessor :data_source_sheet_properties
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Properties of a grid.
|
|
|
|
# Corresponds to the JSON property `gridProperties`
|
|
|
|
# @return [Google::Apis::SheetsV4::GridProperties]
|
|
|
|
attr_accessor :grid_properties
|
|
|
|
|
|
|
|
# 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
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The index of the sheet within the spreadsheet. When adding or updating sheet
|
|
|
|
# properties, if this field is excluded then the sheet is added or moved to the
|
|
|
|
# end of the sheet list. When updating sheet indices or inserting sheets,
|
|
|
|
# movement is considered in "before the move" indexes. For example, if there
|
|
|
|
# were 3 sheets (S1, S2, S3) in order to move S1 ahead of S2 the index would
|
|
|
|
# have to be set to 2. A sheet index update request is ignored if the requested
|
|
|
|
# index is identical to the sheets current index or if the requested new index
|
|
|
|
# is equal to the current sheet index + 1.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `index`
|
|
|
|
# @return [Fixnum]
|
|
|
|
attr_accessor :index
|
|
|
|
|
|
|
|
# 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
|
2017-04-03 20:18:48 +00:00
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The ID of the sheet. Must be non-negative. This field cannot be changed once
|
|
|
|
# set.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `sheetId`
|
|
|
|
# @return [Fixnum]
|
|
|
|
attr_accessor :sheet_id
|
2017-07-12 20:10:42 +00:00
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The type of sheet. Defaults to GRID. This field cannot be changed once set.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `sheetType`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :sheet_type
|
2017-07-12 20:10:42 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Represents a color in the RGBA color space. This representation is designed
|
|
|
|
# for simplicity of conversion to/from color representations in various
|
2020-08-18 00:38:22 +00:00
|
|
|
# languages over compactness; for example, the fields of this representation can
|
|
|
|
# be trivially provided to the constructor of "java.awt.Color" in Java; it can
|
|
|
|
# also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
|
|
|
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
|
|
|
# CSS "rgba()" string in JavaScript, as well. Note: this proto does not carry
|
|
|
|
# information about the absolute color space that should be used to interpret
|
|
|
|
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
|
|
|
# applications SHOULD assume the sRGB color space. Note: when color equality
|
|
|
|
# needs to be decided, implementations, unless documented otherwise, will treat
|
|
|
|
# two colors to be equal if all their red, green, blue and alpha values each
|
|
|
|
# differ by at most 1e-5. 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(''); `; // ...
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `tabColor`
|
|
|
|
# @return [Google::Apis::SheetsV4::Color]
|
|
|
|
attr_accessor :tab_color
|
2017-07-12 20:10:42 +00:00
|
|
|
|
2020-02-05 00:37:38 +00:00
|
|
|
# A color value.
|
|
|
|
# Corresponds to the JSON property `tabColorStyle`
|
|
|
|
# @return [Google::Apis::SheetsV4::ColorStyle]
|
|
|
|
attr_accessor :tab_color_style
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The name of the sheet.
|
|
|
|
# Corresponds to the JSON property `title`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :title
|
2017-04-03 20:18:48 +00:00
|
|
|
|
2017-06-14 17:02:03 +00:00
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
2017-06-02 06:11:31 +00:00
|
|
|
|
2017-06-14 17:02:03 +00:00
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2020-08-28 00:38:58 +00:00
|
|
|
@data_source_sheet_properties = args[:data_source_sheet_properties] if args.key?(:data_source_sheet_properties)
|
2017-08-25 19:54:22 +00:00
|
|
|
@grid_properties = args[:grid_properties] if args.key?(:grid_properties)
|
|
|
|
@hidden = args[:hidden] if args.key?(:hidden)
|
|
|
|
@index = args[:index] if args.key?(:index)
|
|
|
|
@right_to_left = args[:right_to_left] if args.key?(:right_to_left)
|
|
|
|
@sheet_id = args[:sheet_id] if args.key?(:sheet_id)
|
|
|
|
@sheet_type = args[:sheet_type] if args.key?(:sheet_type)
|
|
|
|
@tab_color = args[:tab_color] if args.key?(:tab_color)
|
2020-02-05 00:37:38 +00:00
|
|
|
@tab_color_style = args[:tab_color_style] if args.key?(:tab_color_style)
|
2017-08-25 19:54:22 +00:00
|
|
|
@title = args[:title] if args.key?(:title)
|
2017-06-14 17:02:03 +00:00
|
|
|
end
|
|
|
|
end
|
2017-04-03 20:18:48 +00:00
|
|
|
|
2019-11-05 00:36:31 +00:00
|
|
|
# A slicer in a sheet.
|
|
|
|
class Slicer
|
2017-06-14 17:02:03 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
2017-01-25 07:37:13 +00:00
|
|
|
|
2019-11-05 00:36:31 +00:00
|
|
|
# The position of an embedded object such as a chart.
|
|
|
|
# Corresponds to the JSON property `position`
|
|
|
|
# @return [Google::Apis::SheetsV4::EmbeddedObjectPosition]
|
|
|
|
attr_accessor :position
|
|
|
|
|
|
|
|
# The ID of the slicer.
|
|
|
|
# Corresponds to the JSON property `slicerId`
|
|
|
|
# @return [Fixnum]
|
|
|
|
attr_accessor :slicer_id
|
|
|
|
|
|
|
|
# The specifications of a slicer.
|
|
|
|
# Corresponds to the JSON property `spec`
|
|
|
|
# @return [Google::Apis::SheetsV4::SlicerSpec]
|
|
|
|
attr_accessor :spec
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@position = args[:position] if args.key?(:position)
|
|
|
|
@slicer_id = args[:slicer_id] if args.key?(:slicer_id)
|
|
|
|
@spec = args[:spec] if args.key?(:spec)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
# The specifications of a slicer.
|
|
|
|
class SlicerSpec
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# True if the filter should apply to pivot tables. If not set, default to `True`.
|
2019-11-05 00:36:31 +00:00
|
|
|
# Corresponds to the JSON property `applyToPivotTables`
|
|
|
|
# @return [Boolean]
|
|
|
|
attr_accessor :apply_to_pivot_tables
|
|
|
|
alias_method :apply_to_pivot_tables?, :apply_to_pivot_tables
|
|
|
|
|
|
|
|
# Represents a color in the RGBA color space. This representation is designed
|
|
|
|
# for simplicity of conversion to/from color representations in various
|
2020-08-18 00:38:22 +00:00
|
|
|
# languages over compactness; for example, the fields of this representation can
|
|
|
|
# be trivially provided to the constructor of "java.awt.Color" in Java; it can
|
|
|
|
# also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
|
|
|
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
|
|
|
# CSS "rgba()" string in JavaScript, as well. Note: this proto does not carry
|
|
|
|
# information about the absolute color space that should be used to interpret
|
|
|
|
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
|
|
|
# applications SHOULD assume the sRGB color space. Note: when color equality
|
|
|
|
# needs to be decided, implementations, unless documented otherwise, will treat
|
|
|
|
# two colors to be equal if all their red, green, blue and alpha values each
|
|
|
|
# differ by at most 1e-5. 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(''); `; // ...
|
2019-11-05 00:36:31 +00:00
|
|
|
# Corresponds to the JSON property `backgroundColor`
|
|
|
|
# @return [Google::Apis::SheetsV4::Color]
|
|
|
|
attr_accessor :background_color
|
|
|
|
|
2020-02-05 00:37:38 +00:00
|
|
|
# A color value.
|
|
|
|
# Corresponds to the JSON property `backgroundColorStyle`
|
|
|
|
# @return [Google::Apis::SheetsV4::ColorStyle]
|
|
|
|
attr_accessor :background_color_style
|
|
|
|
|
2019-11-05 00:36:31 +00:00
|
|
|
# The column index in the data table on which the filter is applied to.
|
|
|
|
# Corresponds to the JSON property `columnIndex`
|
|
|
|
# @return [Fixnum]
|
|
|
|
attr_accessor :column_index
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# A range on a sheet. All indexes are zero-based. Indexes are half open, i.e.
|
|
|
|
# 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 sheet 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!`.
|
2019-11-05 00:36:31 +00:00
|
|
|
# Corresponds to the JSON property `dataRange`
|
|
|
|
# @return [Google::Apis::SheetsV4::GridRange]
|
|
|
|
attr_accessor :data_range
|
|
|
|
|
|
|
|
# Criteria for showing/hiding rows in a filter or filter view.
|
|
|
|
# Corresponds to the JSON property `filterCriteria`
|
|
|
|
# @return [Google::Apis::SheetsV4::FilterCriteria]
|
|
|
|
attr_accessor :filter_criteria
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The horizontal alignment of title in the slicer. If unspecified, defaults to `
|
|
|
|
# LEFT`
|
2019-11-05 00:36:31 +00:00
|
|
|
# Corresponds to the JSON property `horizontalAlignment`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :horizontal_alignment
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The format of a run of text in a cell. Absent values indicate that the field
|
|
|
|
# isn't specified.
|
2019-11-05 00:36:31 +00:00
|
|
|
# Corresponds to the JSON property `textFormat`
|
|
|
|
# @return [Google::Apis::SheetsV4::TextFormat]
|
|
|
|
attr_accessor :text_format
|
|
|
|
|
|
|
|
# The title of the slicer.
|
|
|
|
# Corresponds to the JSON property `title`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :title
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@apply_to_pivot_tables = args[:apply_to_pivot_tables] if args.key?(:apply_to_pivot_tables)
|
|
|
|
@background_color = args[:background_color] if args.key?(:background_color)
|
2020-02-05 00:37:38 +00:00
|
|
|
@background_color_style = args[:background_color_style] if args.key?(:background_color_style)
|
2019-11-05 00:36:31 +00:00
|
|
|
@column_index = args[:column_index] if args.key?(:column_index)
|
|
|
|
@data_range = args[:data_range] if args.key?(:data_range)
|
|
|
|
@filter_criteria = args[:filter_criteria] if args.key?(:filter_criteria)
|
|
|
|
@horizontal_alignment = args[:horizontal_alignment] if args.key?(:horizontal_alignment)
|
|
|
|
@text_format = args[:text_format] if args.key?(:text_format)
|
|
|
|
@title = args[:title] if args.key?(:title)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
# Sorts data in rows based on a sort order per column.
|
|
|
|
class SortRangeRequest
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# A range on a sheet. All indexes are zero-based. Indexes are half open, i.e.
|
|
|
|
# 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 sheet 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!`.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `range`
|
|
|
|
# @return [Google::Apis::SheetsV4::GridRange]
|
|
|
|
attr_accessor :range
|
2017-01-25 07:37:13 +00:00
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The sort order per column. Later specifications are used when values are equal
|
|
|
|
# in the earlier specifications.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `sortSpecs`
|
|
|
|
# @return [Array<Google::Apis::SheetsV4::SortSpec>]
|
|
|
|
attr_accessor :sort_specs
|
2017-03-30 22:30:51 +00:00
|
|
|
|
2017-04-03 20:18:48 +00:00
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@range = args[:range] if args.key?(:range)
|
|
|
|
@sort_specs = args[:sort_specs] if args.key?(:sort_specs)
|
2017-06-02 06:11:31 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# A sort order associated with a specific column or row.
|
|
|
|
class SortSpec
|
2017-06-02 06:11:31 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2019-11-05 00:36:31 +00:00
|
|
|
# Represents a color in the RGBA color space. This representation is designed
|
|
|
|
# for simplicity of conversion to/from color representations in various
|
2020-08-18 00:38:22 +00:00
|
|
|
# languages over compactness; for example, the fields of this representation can
|
|
|
|
# be trivially provided to the constructor of "java.awt.Color" in Java; it can
|
|
|
|
# also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
|
|
|
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
|
|
|
# CSS "rgba()" string in JavaScript, as well. Note: this proto does not carry
|
|
|
|
# information about the absolute color space that should be used to interpret
|
|
|
|
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
|
|
|
# applications SHOULD assume the sRGB color space. Note: when color equality
|
|
|
|
# needs to be decided, implementations, unless documented otherwise, will treat
|
|
|
|
# two colors to be equal if all their red, green, blue and alpha values each
|
|
|
|
# differ by at most 1e-5. 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(''); `; // ...
|
2019-11-05 00:36:31 +00:00
|
|
|
# Corresponds to the JSON property `backgroundColor`
|
|
|
|
# @return [Google::Apis::SheetsV4::Color]
|
|
|
|
attr_accessor :background_color
|
|
|
|
|
2020-02-05 00:37:38 +00:00
|
|
|
# A color value.
|
|
|
|
# Corresponds to the JSON property `backgroundColorStyle`
|
|
|
|
# @return [Google::Apis::SheetsV4::ColorStyle]
|
|
|
|
attr_accessor :background_color_style
|
|
|
|
|
2020-09-29 00:38:39 +00:00
|
|
|
# An unique identifier that references a data source column.
|
2020-08-28 00:38:58 +00:00
|
|
|
# Corresponds to the JSON property `dataSourceColumnReference`
|
|
|
|
# @return [Google::Apis::SheetsV4::DataSourceColumnReference]
|
|
|
|
attr_accessor :data_source_column_reference
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The dimension the sort should be applied to.
|
|
|
|
# Corresponds to the JSON property `dimensionIndex`
|
2017-07-12 20:10:42 +00:00
|
|
|
# @return [Fixnum]
|
2017-08-25 19:54:22 +00:00
|
|
|
attr_accessor :dimension_index
|
|
|
|
|
2019-11-05 00:36:31 +00:00
|
|
|
# Represents a color in the RGBA color space. This representation is designed
|
|
|
|
# for simplicity of conversion to/from color representations in various
|
2020-08-18 00:38:22 +00:00
|
|
|
# languages over compactness; for example, the fields of this representation can
|
|
|
|
# be trivially provided to the constructor of "java.awt.Color" in Java; it can
|
|
|
|
# also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
|
|
|
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
|
|
|
# CSS "rgba()" string in JavaScript, as well. Note: this proto does not carry
|
|
|
|
# information about the absolute color space that should be used to interpret
|
|
|
|
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
|
|
|
# applications SHOULD assume the sRGB color space. Note: when color equality
|
|
|
|
# needs to be decided, implementations, unless documented otherwise, will treat
|
|
|
|
# two colors to be equal if all their red, green, blue and alpha values each
|
|
|
|
# differ by at most 1e-5. 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(''); `; // ...
|
2019-11-05 00:36:31 +00:00
|
|
|
# Corresponds to the JSON property `foregroundColor`
|
|
|
|
# @return [Google::Apis::SheetsV4::Color]
|
|
|
|
attr_accessor :foreground_color
|
|
|
|
|
2020-02-05 00:37:38 +00:00
|
|
|
# A color value.
|
|
|
|
# Corresponds to the JSON property `foregroundColorStyle`
|
|
|
|
# @return [Google::Apis::SheetsV4::ColorStyle]
|
|
|
|
attr_accessor :foreground_color_style
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The order data should be sorted.
|
|
|
|
# Corresponds to the JSON property `sortOrder`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :sort_order
|
2017-06-02 06:11:31 +00:00
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2019-11-05 00:36:31 +00:00
|
|
|
@background_color = args[:background_color] if args.key?(:background_color)
|
2020-02-05 00:37:38 +00:00
|
|
|
@background_color_style = args[:background_color_style] if args.key?(:background_color_style)
|
2020-08-28 00:38:58 +00:00
|
|
|
@data_source_column_reference = args[:data_source_column_reference] if args.key?(:data_source_column_reference)
|
2017-08-25 19:54:22 +00:00
|
|
|
@dimension_index = args[:dimension_index] if args.key?(:dimension_index)
|
2019-11-05 00:36:31 +00:00
|
|
|
@foreground_color = args[:foreground_color] if args.key?(:foreground_color)
|
2020-02-05 00:37:38 +00:00
|
|
|
@foreground_color_style = args[:foreground_color_style] if args.key?(:foreground_color_style)
|
2017-08-25 19:54:22 +00:00
|
|
|
@sort_order = args[:sort_order] if args.key?(:sort_order)
|
2017-04-03 20:18:48 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# A combination of a source range and how to extend that source.
|
|
|
|
class SourceAndDestination
|
2017-04-03 20:18:48 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The dimension that data should be filled into.
|
|
|
|
# Corresponds to the JSON property `dimension`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :dimension
|
2017-06-14 17:02:03 +00:00
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# 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.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `fillLength`
|
|
|
|
# @return [Fixnum]
|
|
|
|
attr_accessor :fill_length
|
2017-06-14 17:02:03 +00:00
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# A range on a sheet. All indexes are zero-based. Indexes are half open, i.e.
|
|
|
|
# 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 sheet 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!`.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `source`
|
2017-06-14 17:02:03 +00:00
|
|
|
# @return [Google::Apis::SheetsV4::GridRange]
|
2017-08-25 19:54:22 +00:00
|
|
|
attr_accessor :source
|
2017-06-14 17:02:03 +00:00
|
|
|
|
2017-06-02 06:11:31 +00:00
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@dimension = args[:dimension] if args.key?(:dimension)
|
|
|
|
@fill_length = args[:fill_length] if args.key?(:fill_length)
|
|
|
|
@source = args[:source] if args.key?(:source)
|
2017-06-02 06:11:31 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Resource that represents a spreadsheet.
|
|
|
|
class Spreadsheet
|
2017-06-02 06:11:31 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2020-08-28 00:38:58 +00:00
|
|
|
# Output only. A list of data source refresh schedules.
|
|
|
|
# Corresponds to the JSON property `dataSourceSchedules`
|
|
|
|
# @return [Array<Google::Apis::SheetsV4::DataSourceRefreshSchedule>]
|
|
|
|
attr_accessor :data_source_schedules
|
|
|
|
|
|
|
|
# A list of external data sources connected with the spreadsheet.
|
|
|
|
# Corresponds to the JSON property `dataSources`
|
|
|
|
# @return [Array<Google::Apis::SheetsV4::DataSource>]
|
|
|
|
attr_accessor :data_sources
|
|
|
|
|
2017-09-20 00:35:54 +00:00
|
|
|
# The developer metadata associated with a spreadsheet.
|
|
|
|
# Corresponds to the JSON property `developerMetadata`
|
|
|
|
# @return [Array<Google::Apis::SheetsV4::DeveloperMetadata>]
|
|
|
|
attr_accessor :developer_metadata
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The named ranges defined in a spreadsheet.
|
|
|
|
# Corresponds to the JSON property `namedRanges`
|
|
|
|
# @return [Array<Google::Apis::SheetsV4::NamedRange>]
|
|
|
|
attr_accessor :named_ranges
|
2017-07-12 20:10:42 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Properties of a spreadsheet.
|
|
|
|
# Corresponds to the JSON property `properties`
|
|
|
|
# @return [Google::Apis::SheetsV4::SpreadsheetProperties]
|
|
|
|
attr_accessor :properties
|
2017-07-12 20:10:42 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The sheets that are part of a spreadsheet.
|
|
|
|
# Corresponds to the JSON property `sheets`
|
|
|
|
# @return [Array<Google::Apis::SheetsV4::Sheet>]
|
|
|
|
attr_accessor :sheets
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The ID of the spreadsheet. This field is read-only.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `spreadsheetId`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :spreadsheet_id
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The url of the spreadsheet. This field is read-only.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `spreadsheetUrl`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :spreadsheet_url
|
2017-06-02 06:11:31 +00:00
|
|
|
|
2017-06-14 17:02:03 +00:00
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
2017-06-02 06:11:31 +00:00
|
|
|
|
2017-06-14 17:02:03 +00:00
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2020-08-28 00:38:58 +00:00
|
|
|
@data_source_schedules = args[:data_source_schedules] if args.key?(:data_source_schedules)
|
|
|
|
@data_sources = args[:data_sources] if args.key?(:data_sources)
|
2017-09-20 00:35:54 +00:00
|
|
|
@developer_metadata = args[:developer_metadata] if args.key?(:developer_metadata)
|
2017-08-25 19:54:22 +00:00
|
|
|
@named_ranges = args[:named_ranges] if args.key?(:named_ranges)
|
|
|
|
@properties = args[:properties] if args.key?(:properties)
|
|
|
|
@sheets = args[:sheets] if args.key?(:sheets)
|
|
|
|
@spreadsheet_id = args[:spreadsheet_id] if args.key?(:spreadsheet_id)
|
|
|
|
@spreadsheet_url = args[:spreadsheet_url] if args.key?(:spreadsheet_url)
|
2017-06-14 17:02:03 +00:00
|
|
|
end
|
|
|
|
end
|
2017-06-02 06:11:31 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Properties of a spreadsheet.
|
|
|
|
class SpreadsheetProperties
|
2017-07-12 20:10:42 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
2017-06-14 17:02:03 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The amount of time to wait before volatile functions are recalculated.
|
|
|
|
# Corresponds to the JSON property `autoRecalc`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :auto_recalc
|
2017-06-02 06:11:31 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The format of a cell.
|
|
|
|
# Corresponds to the JSON property `defaultFormat`
|
|
|
|
# @return [Google::Apis::SheetsV4::CellFormat]
|
|
|
|
attr_accessor :default_format
|
2017-06-02 06:11:31 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Settings to control how circular dependencies are resolved with iterative
|
|
|
|
# calculation.
|
|
|
|
# Corresponds to the JSON property `iterativeCalculationSettings`
|
|
|
|
# @return [Google::Apis::SheetsV4::IterativeCalculationSettings]
|
|
|
|
attr_accessor :iterative_calculation_settings
|
2017-06-02 06:11:31 +00:00
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The locale of the spreadsheet in one of the following formats: * an ISO 639-1
|
|
|
|
# language code such as `en` * an ISO 639-2 language code such as `fil`, if no
|
|
|
|
# 639-1 code exists * a combination of the ISO language code and country code,
|
|
|
|
# such as `en_US` Note: when updating this field, not all locales/languages are
|
|
|
|
# supported.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `locale`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :locale
|
|
|
|
|
2019-12-18 00:37:51 +00:00
|
|
|
# Represents spreadsheet theme
|
|
|
|
# Corresponds to the JSON property `spreadsheetTheme`
|
|
|
|
# @return [Google::Apis::SheetsV4::SpreadsheetTheme]
|
|
|
|
attr_accessor :spreadsheet_theme
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# 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`.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `timeZone`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :time_zone
|
|
|
|
|
|
|
|
# The title of the spreadsheet.
|
|
|
|
# Corresponds to the JSON property `title`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :title
|
2017-06-02 06:11:31 +00:00
|
|
|
|
2017-06-14 17:02:03 +00:00
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@auto_recalc = args[:auto_recalc] if args.key?(:auto_recalc)
|
|
|
|
@default_format = args[:default_format] if args.key?(:default_format)
|
|
|
|
@iterative_calculation_settings = args[:iterative_calculation_settings] if args.key?(:iterative_calculation_settings)
|
|
|
|
@locale = args[:locale] if args.key?(:locale)
|
2019-12-18 00:37:51 +00:00
|
|
|
@spreadsheet_theme = args[:spreadsheet_theme] if args.key?(:spreadsheet_theme)
|
2017-08-25 19:54:22 +00:00
|
|
|
@time_zone = args[:time_zone] if args.key?(:time_zone)
|
|
|
|
@title = args[:title] if args.key?(:title)
|
2017-06-14 17:02:03 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2019-12-18 00:37:51 +00:00
|
|
|
# Represents spreadsheet theme
|
|
|
|
class SpreadsheetTheme
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2020-09-15 00:38:05 +00:00
|
|
|
# Name of the primary font family.
|
2019-12-18 00:37:51 +00:00
|
|
|
# Corresponds to the JSON property `primaryFontFamily`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :primary_font_family
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The spreadsheet theme color pairs. To update you must provide all theme color
|
|
|
|
# pairs.
|
2019-12-18 00:37:51 +00:00
|
|
|
# Corresponds to the JSON property `themeColors`
|
|
|
|
# @return [Array<Google::Apis::SheetsV4::ThemeColorPair>]
|
|
|
|
attr_accessor :theme_colors
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@primary_font_family = args[:primary_font_family] if args.key?(:primary_font_family)
|
|
|
|
@theme_colors = args[:theme_colors] if args.key?(:theme_colors)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The format of a run of text in a cell. Absent values indicate that the field
|
|
|
|
# isn't specified.
|
2017-08-25 19:54:22 +00:00
|
|
|
class TextFormat
|
2017-06-14 17:02:03 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# True if the text is bold.
|
|
|
|
# Corresponds to the JSON property `bold`
|
|
|
|
# @return [Boolean]
|
|
|
|
attr_accessor :bold
|
|
|
|
alias_method :bold?, :bold
|
|
|
|
|
|
|
|
# The font family.
|
|
|
|
# Corresponds to the JSON property `fontFamily`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :font_family
|
|
|
|
|
|
|
|
# The size of the font.
|
|
|
|
# Corresponds to the JSON property `fontSize`
|
|
|
|
# @return [Fixnum]
|
|
|
|
attr_accessor :font_size
|
|
|
|
|
2017-07-12 20:10:42 +00:00
|
|
|
# Represents a color in the RGBA color space. This representation is designed
|
|
|
|
# for simplicity of conversion to/from color representations in various
|
2020-08-18 00:38:22 +00:00
|
|
|
# languages over compactness; for example, the fields of this representation can
|
|
|
|
# be trivially provided to the constructor of "java.awt.Color" in Java; it can
|
|
|
|
# also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
|
|
|
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
|
|
|
# CSS "rgba()" string in JavaScript, as well. Note: this proto does not carry
|
|
|
|
# information about the absolute color space that should be used to interpret
|
|
|
|
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
|
|
|
# applications SHOULD assume the sRGB color space. Note: when color equality
|
|
|
|
# needs to be decided, implementations, unless documented otherwise, will treat
|
|
|
|
# two colors to be equal if all their red, green, blue and alpha values each
|
|
|
|
# differ by at most 1e-5. 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(''); `; // ...
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `foregroundColor`
|
2017-07-12 20:10:42 +00:00
|
|
|
# @return [Google::Apis::SheetsV4::Color]
|
2017-08-25 19:54:22 +00:00
|
|
|
attr_accessor :foreground_color
|
|
|
|
|
2020-02-05 00:37:38 +00:00
|
|
|
# A color value.
|
|
|
|
# Corresponds to the JSON property `foregroundColorStyle`
|
|
|
|
# @return [Google::Apis::SheetsV4::ColorStyle]
|
|
|
|
attr_accessor :foreground_color_style
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# True if the text is italicized.
|
|
|
|
# Corresponds to the JSON property `italic`
|
|
|
|
# @return [Boolean]
|
|
|
|
attr_accessor :italic
|
|
|
|
alias_method :italic?, :italic
|
|
|
|
|
|
|
|
# True if the text has a strikethrough.
|
|
|
|
# Corresponds to the JSON property `strikethrough`
|
|
|
|
# @return [Boolean]
|
|
|
|
attr_accessor :strikethrough
|
|
|
|
alias_method :strikethrough?, :strikethrough
|
|
|
|
|
|
|
|
# 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)
|
|
|
|
@font_family = args[:font_family] if args.key?(:font_family)
|
|
|
|
@font_size = args[:font_size] if args.key?(:font_size)
|
|
|
|
@foreground_color = args[:foreground_color] if args.key?(:foreground_color)
|
2020-02-05 00:37:38 +00:00
|
|
|
@foreground_color_style = args[:foreground_color_style] if args.key?(:foreground_color_style)
|
2017-08-25 19:54:22 +00:00
|
|
|
@italic = args[:italic] if args.key?(:italic)
|
|
|
|
@strikethrough = args[:strikethrough] if args.key?(:strikethrough)
|
|
|
|
@underline = args[:underline] if args.key?(:underline)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# A run of a text format. The format of this run continues until the start index
|
|
|
|
# of the next run. When updating, all fields must be set.
|
2017-08-25 19:54:22 +00:00
|
|
|
class TextFormatRun
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The format of a run of text in a cell. Absent values indicate that the field
|
|
|
|
# isn't specified.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `format`
|
|
|
|
# @return [Google::Apis::SheetsV4::TextFormat]
|
|
|
|
attr_accessor :format
|
|
|
|
|
|
|
|
# The character index where this run starts.
|
|
|
|
# Corresponds to the JSON property `startIndex`
|
|
|
|
# @return [Fixnum]
|
|
|
|
attr_accessor :start_index
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@format = args[:format] if args.key?(:format)
|
|
|
|
@start_index = args[:start_index] if args.key?(:start_index)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-10-03 00:35:28 +00:00
|
|
|
# Position settings for text.
|
|
|
|
class TextPosition
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
|
|
|
# Horizontal alignment setting for the piece of text.
|
|
|
|
# Corresponds to the JSON property `horizontalAlignment`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :horizontal_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)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The rotation applied to text in a cell.
|
|
|
|
class TextRotation
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
|
|
|
# The angle between the standard orientation and the desired orientation.
|
2020-08-18 00:38:22 +00:00
|
|
|
# Measured in degrees. Valid values are between -90 and 90. Positive angles are
|
|
|
|
# angled upwards, negative are angled downwards. Note: For LTR text direction
|
|
|
|
# positive angles are in the counterclockwise direction, whereas for RTL they
|
|
|
|
# are in the clockwise direction
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `angle`
|
|
|
|
# @return [Fixnum]
|
|
|
|
attr_accessor :angle
|
|
|
|
|
|
|
|
# If true, text reads top to bottom, but the orientation of individual
|
2020-08-18 00:38:22 +00:00
|
|
|
# characters is unchanged. For example: | V | | e | | r | | t | | i | | c | | a |
|
2017-08-25 19:54:22 +00:00
|
|
|
# | l |
|
|
|
|
# Corresponds to the JSON property `vertical`
|
|
|
|
# @return [Boolean]
|
|
|
|
attr_accessor :vertical
|
|
|
|
alias_method :vertical?, :vertical
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@angle = args[:angle] if args.key?(:angle)
|
|
|
|
@vertical = args[:vertical] if args.key?(:vertical)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# Splits a column of text into multiple columns, based on a delimiter in each
|
|
|
|
# cell.
|
2017-08-25 19:54:22 +00:00
|
|
|
class TextToColumnsRequest
|
|
|
|
include Google::Apis::Core::Hashable
|
2017-07-12 20:10:42 +00:00
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The delimiter to use. Used only if delimiterType is CUSTOM.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `delimiter`
|
2017-06-14 17:02:03 +00:00
|
|
|
# @return [String]
|
2017-08-25 19:54:22 +00:00
|
|
|
attr_accessor :delimiter
|
2017-06-14 17:02:03 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The delimiter type to use.
|
|
|
|
# Corresponds to the JSON property `delimiterType`
|
2017-07-12 20:10:42 +00:00
|
|
|
# @return [String]
|
2017-08-25 19:54:22 +00:00
|
|
|
attr_accessor :delimiter_type
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# A range on a sheet. All indexes are zero-based. Indexes are half open, i.e.
|
|
|
|
# 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 sheet 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!`.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `source`
|
|
|
|
# @return [Google::Apis::SheetsV4::GridRange]
|
|
|
|
attr_accessor :source
|
2017-06-02 06:11:31 +00:00
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@delimiter = args[:delimiter] if args.key?(:delimiter)
|
|
|
|
@delimiter_type = args[:delimiter_type] if args.key?(:delimiter_type)
|
|
|
|
@source = args[:source] if args.key?(:source)
|
2017-06-02 06:11:31 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2019-12-18 00:37:51 +00:00
|
|
|
# A pair mapping a spreadsheet theme color type to the concrete color it
|
|
|
|
# represents.
|
|
|
|
class ThemeColorPair
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
|
|
|
# A color value.
|
|
|
|
# Corresponds to the JSON property `color`
|
|
|
|
# @return [Google::Apis::SheetsV4::ColorStyle]
|
|
|
|
attr_accessor :color
|
|
|
|
|
|
|
|
# The type of the spreadsheet theme color.
|
|
|
|
# Corresponds to the JSON property `colorType`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :color_type
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@color = args[:color] if args.key?(:color)
|
|
|
|
@color_type = args[:color_type] if args.key?(:color_type)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2020-08-28 00:38:58 +00:00
|
|
|
# Represents a time of day. The date and time zone are either not significant or
|
|
|
|
# are specified elsewhere. An API may choose to allow leap seconds. Related
|
|
|
|
# types are google.type.Date and `google.protobuf.Timestamp`.
|
|
|
|
class TimeOfDay
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
|
|
|
# Hours of day in 24 hour format. Should be from 0 to 23. An API may choose to
|
|
|
|
# allow the value "24:00:00" for scenarios like business closing time.
|
|
|
|
# Corresponds to the JSON property `hours`
|
|
|
|
# @return [Fixnum]
|
|
|
|
attr_accessor :hours
|
|
|
|
|
|
|
|
# Minutes of hour of day. Must be from 0 to 59.
|
|
|
|
# Corresponds to the JSON property `minutes`
|
|
|
|
# @return [Fixnum]
|
|
|
|
attr_accessor :minutes
|
|
|
|
|
|
|
|
# Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.
|
|
|
|
# Corresponds to the JSON property `nanos`
|
|
|
|
# @return [Fixnum]
|
|
|
|
attr_accessor :nanos
|
|
|
|
|
|
|
|
# Seconds of minutes of the time. Must normally be from 0 to 59. An API may
|
|
|
|
# allow the value 60 if it allows leap-seconds.
|
|
|
|
# Corresponds to the JSON property `seconds`
|
|
|
|
# @return [Fixnum]
|
|
|
|
attr_accessor :seconds
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@hours = args[:hours] if args.key?(:hours)
|
|
|
|
@minutes = args[:minutes] if args.key?(:minutes)
|
|
|
|
@nanos = args[:nanos] if args.key?(:nanos)
|
|
|
|
@seconds = args[:seconds] if args.key?(:seconds)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2018-03-13 00:36:07 +00:00
|
|
|
# A color scale for a treemap chart.
|
|
|
|
class TreemapChartColorScale
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
|
|
|
# Represents a color in the RGBA color space. This representation is designed
|
|
|
|
# for simplicity of conversion to/from color representations in various
|
2020-08-18 00:38:22 +00:00
|
|
|
# languages over compactness; for example, the fields of this representation can
|
|
|
|
# be trivially provided to the constructor of "java.awt.Color" in Java; it can
|
|
|
|
# also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
|
|
|
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
|
|
|
# CSS "rgba()" string in JavaScript, as well. Note: this proto does not carry
|
|
|
|
# information about the absolute color space that should be used to interpret
|
|
|
|
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
|
|
|
# applications SHOULD assume the sRGB color space. Note: when color equality
|
|
|
|
# needs to be decided, implementations, unless documented otherwise, will treat
|
|
|
|
# two colors to be equal if all their red, green, blue and alpha values each
|
|
|
|
# differ by at most 1e-5. 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(''); `; // ...
|
2018-03-13 00:36:07 +00:00
|
|
|
# Corresponds to the JSON property `maxValueColor`
|
|
|
|
# @return [Google::Apis::SheetsV4::Color]
|
|
|
|
attr_accessor :max_value_color
|
|
|
|
|
2020-01-25 00:37:19 +00:00
|
|
|
# A color value.
|
|
|
|
# Corresponds to the JSON property `maxValueColorStyle`
|
|
|
|
# @return [Google::Apis::SheetsV4::ColorStyle]
|
|
|
|
attr_accessor :max_value_color_style
|
|
|
|
|
2018-03-13 00:36:07 +00:00
|
|
|
# Represents a color in the RGBA color space. This representation is designed
|
|
|
|
# for simplicity of conversion to/from color representations in various
|
2020-08-18 00:38:22 +00:00
|
|
|
# languages over compactness; for example, the fields of this representation can
|
|
|
|
# be trivially provided to the constructor of "java.awt.Color" in Java; it can
|
|
|
|
# also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
|
|
|
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
|
|
|
# CSS "rgba()" string in JavaScript, as well. Note: this proto does not carry
|
|
|
|
# information about the absolute color space that should be used to interpret
|
|
|
|
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
|
|
|
# applications SHOULD assume the sRGB color space. Note: when color equality
|
|
|
|
# needs to be decided, implementations, unless documented otherwise, will treat
|
|
|
|
# two colors to be equal if all their red, green, blue and alpha values each
|
|
|
|
# differ by at most 1e-5. 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(''); `; // ...
|
2018-03-13 00:36:07 +00:00
|
|
|
# Corresponds to the JSON property `midValueColor`
|
|
|
|
# @return [Google::Apis::SheetsV4::Color]
|
|
|
|
attr_accessor :mid_value_color
|
|
|
|
|
2020-01-25 00:37:19 +00:00
|
|
|
# A color value.
|
|
|
|
# Corresponds to the JSON property `midValueColorStyle`
|
|
|
|
# @return [Google::Apis::SheetsV4::ColorStyle]
|
|
|
|
attr_accessor :mid_value_color_style
|
|
|
|
|
2018-03-13 00:36:07 +00:00
|
|
|
# Represents a color in the RGBA color space. This representation is designed
|
|
|
|
# for simplicity of conversion to/from color representations in various
|
2020-08-18 00:38:22 +00:00
|
|
|
# languages over compactness; for example, the fields of this representation can
|
|
|
|
# be trivially provided to the constructor of "java.awt.Color" in Java; it can
|
|
|
|
# also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
|
|
|
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
|
|
|
# CSS "rgba()" string in JavaScript, as well. Note: this proto does not carry
|
|
|
|
# information about the absolute color space that should be used to interpret
|
|
|
|
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
|
|
|
# applications SHOULD assume the sRGB color space. Note: when color equality
|
|
|
|
# needs to be decided, implementations, unless documented otherwise, will treat
|
|
|
|
# two colors to be equal if all their red, green, blue and alpha values each
|
|
|
|
# differ by at most 1e-5. 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(''); `; // ...
|
2018-03-13 00:36:07 +00:00
|
|
|
# Corresponds to the JSON property `minValueColor`
|
|
|
|
# @return [Google::Apis::SheetsV4::Color]
|
|
|
|
attr_accessor :min_value_color
|
|
|
|
|
2020-01-25 00:37:19 +00:00
|
|
|
# A color value.
|
|
|
|
# Corresponds to the JSON property `minValueColorStyle`
|
|
|
|
# @return [Google::Apis::SheetsV4::ColorStyle]
|
|
|
|
attr_accessor :min_value_color_style
|
|
|
|
|
2018-03-13 00:36:07 +00:00
|
|
|
# Represents a color in the RGBA color space. This representation is designed
|
|
|
|
# for simplicity of conversion to/from color representations in various
|
2020-08-18 00:38:22 +00:00
|
|
|
# languages over compactness; for example, the fields of this representation can
|
|
|
|
# be trivially provided to the constructor of "java.awt.Color" in Java; it can
|
|
|
|
# also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
|
|
|
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
|
|
|
# CSS "rgba()" string in JavaScript, as well. Note: this proto does not carry
|
|
|
|
# information about the absolute color space that should be used to interpret
|
|
|
|
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
|
|
|
# applications SHOULD assume the sRGB color space. Note: when color equality
|
|
|
|
# needs to be decided, implementations, unless documented otherwise, will treat
|
|
|
|
# two colors to be equal if all their red, green, blue and alpha values each
|
|
|
|
# differ by at most 1e-5. 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(''); `; // ...
|
2018-03-13 00:36:07 +00:00
|
|
|
# Corresponds to the JSON property `noDataColor`
|
|
|
|
# @return [Google::Apis::SheetsV4::Color]
|
|
|
|
attr_accessor :no_data_color
|
|
|
|
|
2020-01-25 00:37:19 +00:00
|
|
|
# A color value.
|
|
|
|
# Corresponds to the JSON property `noDataColorStyle`
|
|
|
|
# @return [Google::Apis::SheetsV4::ColorStyle]
|
|
|
|
attr_accessor :no_data_color_style
|
|
|
|
|
2018-03-13 00:36:07 +00:00
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@max_value_color = args[:max_value_color] if args.key?(:max_value_color)
|
2020-01-25 00:37:19 +00:00
|
|
|
@max_value_color_style = args[:max_value_color_style] if args.key?(:max_value_color_style)
|
2018-03-13 00:36:07 +00:00
|
|
|
@mid_value_color = args[:mid_value_color] if args.key?(:mid_value_color)
|
2020-01-25 00:37:19 +00:00
|
|
|
@mid_value_color_style = args[:mid_value_color_style] if args.key?(:mid_value_color_style)
|
2018-03-13 00:36:07 +00:00
|
|
|
@min_value_color = args[:min_value_color] if args.key?(:min_value_color)
|
2020-01-25 00:37:19 +00:00
|
|
|
@min_value_color_style = args[:min_value_color_style] if args.key?(:min_value_color_style)
|
2018-03-13 00:36:07 +00:00
|
|
|
@no_data_color = args[:no_data_color] if args.key?(:no_data_color)
|
2020-01-25 00:37:19 +00:00
|
|
|
@no_data_color_style = args[:no_data_color_style] if args.key?(:no_data_color_style)
|
2018-03-13 00:36:07 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# A Treemap chart.
|
2018-03-13 00:36:07 +00:00
|
|
|
class TreemapChartSpec
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
|
|
|
# The data included in a domain or series.
|
|
|
|
# Corresponds to the JSON property `colorData`
|
|
|
|
# @return [Google::Apis::SheetsV4::ChartData]
|
|
|
|
attr_accessor :color_data
|
|
|
|
|
|
|
|
# A color scale for a treemap chart.
|
|
|
|
# Corresponds to the JSON property `colorScale`
|
|
|
|
# @return [Google::Apis::SheetsV4::TreemapChartColorScale]
|
|
|
|
attr_accessor :color_scale
|
|
|
|
|
|
|
|
# Represents a color in the RGBA color space. This representation is designed
|
|
|
|
# for simplicity of conversion to/from color representations in various
|
2020-08-18 00:38:22 +00:00
|
|
|
# languages over compactness; for example, the fields of this representation can
|
|
|
|
# be trivially provided to the constructor of "java.awt.Color" in Java; it can
|
|
|
|
# also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
|
|
|
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
|
|
|
# CSS "rgba()" string in JavaScript, as well. Note: this proto does not carry
|
|
|
|
# information about the absolute color space that should be used to interpret
|
|
|
|
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
|
|
|
# applications SHOULD assume the sRGB color space. Note: when color equality
|
|
|
|
# needs to be decided, implementations, unless documented otherwise, will treat
|
|
|
|
# two colors to be equal if all their red, green, blue and alpha values each
|
|
|
|
# differ by at most 1e-5. 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(''); `; // ...
|
2018-03-13 00:36:07 +00:00
|
|
|
# Corresponds to the JSON property `headerColor`
|
|
|
|
# @return [Google::Apis::SheetsV4::Color]
|
|
|
|
attr_accessor :header_color
|
|
|
|
|
2020-01-25 00:37:19 +00:00
|
|
|
# A color value.
|
|
|
|
# Corresponds to the JSON property `headerColorStyle`
|
|
|
|
# @return [Google::Apis::SheetsV4::ColorStyle]
|
|
|
|
attr_accessor :header_color_style
|
|
|
|
|
2018-03-13 00:36:07 +00:00
|
|
|
# True to hide tooltips.
|
|
|
|
# Corresponds to the JSON property `hideTooltips`
|
|
|
|
# @return [Boolean]
|
|
|
|
attr_accessor :hide_tooltips
|
|
|
|
alias_method :hide_tooltips?, :hide_tooltips
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The number of additional data levels beyond the labeled levels to be shown on
|
|
|
|
# the treemap chart. These levels are not interactive and are shown without
|
|
|
|
# their labels. Defaults to 0 if not specified.
|
2018-03-13 00:36:07 +00:00
|
|
|
# Corresponds to the JSON property `hintedLevels`
|
|
|
|
# @return [Fixnum]
|
|
|
|
attr_accessor :hinted_levels
|
|
|
|
|
|
|
|
# The data included in a domain or series.
|
|
|
|
# Corresponds to the JSON property `labels`
|
|
|
|
# @return [Google::Apis::SheetsV4::ChartData]
|
|
|
|
attr_accessor :labels
|
|
|
|
|
|
|
|
# The number of data levels to show on the treemap chart. These levels are
|
2020-08-18 00:38:22 +00:00
|
|
|
# interactive and are shown with their labels. Defaults to 2 if not specified.
|
2018-03-13 00:36:07 +00:00
|
|
|
# Corresponds to the JSON property `levels`
|
|
|
|
# @return [Fixnum]
|
|
|
|
attr_accessor :levels
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The maximum possible data value. Cells with values greater than this will have
|
|
|
|
# the same color as cells with this value. If not specified, defaults to the
|
|
|
|
# actual maximum value from color_data, or the maximum value from size_data if
|
|
|
|
# color_data is not specified.
|
2018-03-13 00:36:07 +00:00
|
|
|
# Corresponds to the JSON property `maxValue`
|
|
|
|
# @return [Float]
|
|
|
|
attr_accessor :max_value
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The minimum possible data value. Cells with values less than this will have
|
|
|
|
# the same color as cells with this value. If not specified, defaults to the
|
|
|
|
# actual minimum value from color_data, or the minimum value from size_data if
|
|
|
|
# color_data is not specified.
|
2018-03-13 00:36:07 +00:00
|
|
|
# Corresponds to the JSON property `minValue`
|
|
|
|
# @return [Float]
|
|
|
|
attr_accessor :min_value
|
|
|
|
|
|
|
|
# The data included in a domain or series.
|
|
|
|
# Corresponds to the JSON property `parentLabels`
|
|
|
|
# @return [Google::Apis::SheetsV4::ChartData]
|
|
|
|
attr_accessor :parent_labels
|
|
|
|
|
|
|
|
# The data included in a domain or series.
|
|
|
|
# Corresponds to the JSON property `sizeData`
|
|
|
|
# @return [Google::Apis::SheetsV4::ChartData]
|
|
|
|
attr_accessor :size_data
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The format of a run of text in a cell. Absent values indicate that the field
|
|
|
|
# isn't specified.
|
2018-03-13 00:36:07 +00:00
|
|
|
# Corresponds to the JSON property `textFormat`
|
|
|
|
# @return [Google::Apis::SheetsV4::TextFormat]
|
|
|
|
attr_accessor :text_format
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@color_data = args[:color_data] if args.key?(:color_data)
|
|
|
|
@color_scale = args[:color_scale] if args.key?(:color_scale)
|
|
|
|
@header_color = args[:header_color] if args.key?(:header_color)
|
2020-01-25 00:37:19 +00:00
|
|
|
@header_color_style = args[:header_color_style] if args.key?(:header_color_style)
|
2018-03-13 00:36:07 +00:00
|
|
|
@hide_tooltips = args[:hide_tooltips] if args.key?(:hide_tooltips)
|
|
|
|
@hinted_levels = args[:hinted_levels] if args.key?(:hinted_levels)
|
|
|
|
@labels = args[:labels] if args.key?(:labels)
|
|
|
|
@levels = args[:levels] if args.key?(:levels)
|
|
|
|
@max_value = args[:max_value] if args.key?(:max_value)
|
|
|
|
@min_value = args[:min_value] if args.key?(:min_value)
|
|
|
|
@parent_labels = args[:parent_labels] if args.key?(:parent_labels)
|
|
|
|
@size_data = args[:size_data] if args.key?(:size_data)
|
|
|
|
@text_format = args[:text_format] if args.key?(:text_format)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# Trims the whitespace (such as spaces, tabs, or new lines) in every cell in the
|
|
|
|
# specified range. This request removes all whitespace from the start and end of
|
|
|
|
# each cell's text, and reduces any subsequence of remaining whitespace
|
2019-07-23 00:37:37 +00:00
|
|
|
# characters to a single space. If the resulting trimmed text starts with a '+'
|
2020-08-18 00:38:22 +00:00
|
|
|
# or '=' character, the text remains as a string value and isn't interpreted as
|
|
|
|
# a formula.
|
2019-07-23 00:37:37 +00:00
|
|
|
class TrimWhitespaceRequest
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# A range on a sheet. All indexes are zero-based. Indexes are half open, i.e.
|
|
|
|
# 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 sheet 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!`.
|
2019-07-23 00:37:37 +00:00
|
|
|
# Corresponds to the JSON property `range`
|
|
|
|
# @return [Google::Apis::SheetsV4::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
|
|
|
|
|
|
|
|
# The result of trimming whitespace in cells.
|
|
|
|
class TrimWhitespaceResponse
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
|
|
|
# The number of cells that were trimmed of whitespace.
|
|
|
|
# Corresponds to the JSON property `cellsChangedCount`
|
|
|
|
# @return [Fixnum]
|
|
|
|
attr_accessor :cells_changed_count
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@cells_changed_count = args[:cells_changed_count] if args.key?(:cells_changed_count)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Unmerges cells in the given range.
|
|
|
|
class UnmergeCellsRequest
|
2017-06-02 06:11:31 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# A range on a sheet. All indexes are zero-based. Indexes are half open, i.e.
|
|
|
|
# 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 sheet 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!`.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `range`
|
|
|
|
# @return [Google::Apis::SheetsV4::GridRange]
|
|
|
|
attr_accessor :range
|
2017-06-02 06:11:31 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
2017-06-02 06:11:31 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@range = args[:range] if args.key?(:range)
|
|
|
|
end
|
|
|
|
end
|
2017-07-12 20:10:42 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Updates properties of the supplied banded range.
|
|
|
|
class UpdateBandingRequest
|
|
|
|
include Google::Apis::Core::Hashable
|
2017-07-12 20:10:42 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# A banded (alternating colors) range in a sheet.
|
|
|
|
# Corresponds to the JSON property `bandedRange`
|
|
|
|
# @return [Google::Apis::SheetsV4::BandedRange]
|
|
|
|
attr_accessor :banded_range
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The fields that should be updated. At least one field must be specified. The
|
|
|
|
# root `bandedRange` is implied and should not be specified. A single `"*"` can
|
|
|
|
# be used as short-hand for listing every field.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `fields`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :fields
|
2017-06-02 06:11:31 +00:00
|
|
|
|
2017-06-14 17:02:03 +00:00
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
2017-06-02 06:11:31 +00:00
|
|
|
|
2017-06-14 17:02:03 +00:00
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@banded_range = args[:banded_range] if args.key?(:banded_range)
|
|
|
|
@fields = args[:fields] if args.key?(:fields)
|
2017-06-14 17:02:03 +00:00
|
|
|
end
|
|
|
|
end
|
2017-06-02 06:11:31 +00:00
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# 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
|
|
|
|
# UpdateBordersRequest: 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.
|
2017-08-25 19:54:22 +00:00
|
|
|
class UpdateBordersRequest
|
2017-06-14 17:02:03 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
2017-06-02 06:11:31 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# A border along a cell.
|
|
|
|
# Corresponds to the JSON property `bottom`
|
|
|
|
# @return [Google::Apis::SheetsV4::Border]
|
|
|
|
attr_accessor :bottom
|
|
|
|
|
|
|
|
# A border along a cell.
|
|
|
|
# Corresponds to the JSON property `innerHorizontal`
|
|
|
|
# @return [Google::Apis::SheetsV4::Border]
|
|
|
|
attr_accessor :inner_horizontal
|
|
|
|
|
|
|
|
# A border along a cell.
|
|
|
|
# Corresponds to the JSON property `innerVertical`
|
|
|
|
# @return [Google::Apis::SheetsV4::Border]
|
|
|
|
attr_accessor :inner_vertical
|
|
|
|
|
|
|
|
# A border along a cell.
|
|
|
|
# Corresponds to the JSON property `left`
|
|
|
|
# @return [Google::Apis::SheetsV4::Border]
|
|
|
|
attr_accessor :left
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# A range on a sheet. All indexes are zero-based. Indexes are half open, i.e.
|
|
|
|
# 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 sheet 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!`.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `range`
|
|
|
|
# @return [Google::Apis::SheetsV4::GridRange]
|
|
|
|
attr_accessor :range
|
|
|
|
|
|
|
|
# A border along a cell.
|
|
|
|
# Corresponds to the JSON property `right`
|
|
|
|
# @return [Google::Apis::SheetsV4::Border]
|
|
|
|
attr_accessor :right
|
|
|
|
|
|
|
|
# A border along a cell.
|
|
|
|
# Corresponds to the JSON property `top`
|
|
|
|
# @return [Google::Apis::SheetsV4::Border]
|
|
|
|
attr_accessor :top
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@bottom = args[:bottom] if args.key?(:bottom)
|
|
|
|
@inner_horizontal = args[:inner_horizontal] if args.key?(:inner_horizontal)
|
|
|
|
@inner_vertical = args[:inner_vertical] if args.key?(:inner_vertical)
|
|
|
|
@left = args[:left] if args.key?(:left)
|
|
|
|
@range = args[:range] if args.key?(:range)
|
|
|
|
@right = args[:right] if args.key?(:right)
|
|
|
|
@top = args[:top] if args.key?(:top)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
# Updates all cells in a range with new data.
|
|
|
|
class UpdateCellsRequest
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The fields of CellData that should be updated. At least one field must be
|
|
|
|
# specified. The root is the CellData; 'row.values.' should not be specified. A
|
|
|
|
# single `"*"` can be used as short-hand for listing every field.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `fields`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :fields
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# A range on a sheet. All indexes are zero-based. Indexes are half open, i.e.
|
|
|
|
# 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 sheet 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!`.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `range`
|
|
|
|
# @return [Google::Apis::SheetsV4::GridRange]
|
|
|
|
attr_accessor :range
|
|
|
|
|
|
|
|
# The data to write.
|
|
|
|
# Corresponds to the JSON property `rows`
|
|
|
|
# @return [Array<Google::Apis::SheetsV4::RowData>]
|
|
|
|
attr_accessor :rows
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# A coordinate in a sheet. All indexes are zero-based.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `start`
|
|
|
|
# @return [Google::Apis::SheetsV4::GridCoordinate]
|
|
|
|
attr_accessor :start
|
2017-06-02 06:11:31 +00:00
|
|
|
|
2017-07-12 20:10:42 +00:00
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@fields = args[:fields] if args.key?(:fields)
|
|
|
|
@range = args[:range] if args.key?(:range)
|
|
|
|
@rows = args[:rows] if args.key?(:rows)
|
|
|
|
@start = args[:start] if args.key?(:start)
|
2017-07-12 20:10:42 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# Updates a chart's specifications. (This does not move or resize a chart. To
|
|
|
|
# move or resize a chart, use UpdateEmbeddedObjectPositionRequest.)
|
2017-08-25 19:54:22 +00:00
|
|
|
class UpdateChartSpecRequest
|
2017-07-12 20:10:42 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The ID of the chart to update.
|
|
|
|
# Corresponds to the JSON property `chartId`
|
2017-07-12 20:10:42 +00:00
|
|
|
# @return [Fixnum]
|
2017-08-25 19:54:22 +00:00
|
|
|
attr_accessor :chart_id
|
|
|
|
|
|
|
|
# The specifications of a chart.
|
|
|
|
# Corresponds to the JSON property `spec`
|
|
|
|
# @return [Google::Apis::SheetsV4::ChartSpec]
|
|
|
|
attr_accessor :spec
|
2017-06-14 17:02:03 +00:00
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@chart_id = args[:chart_id] if args.key?(:chart_id)
|
|
|
|
@spec = args[:spec] if args.key?(:spec)
|
2017-06-14 17:02:03 +00:00
|
|
|
end
|
|
|
|
end
|
2017-06-02 06:11:31 +00:00
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# Updates a conditional format rule at the given index, or moves a conditional
|
|
|
|
# format rule to another index.
|
2017-08-25 19:54:22 +00:00
|
|
|
class UpdateConditionalFormatRuleRequest
|
2017-06-14 17:02:03 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
2017-06-02 06:11:31 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The zero-based index of the rule that should be replaced or moved.
|
|
|
|
# Corresponds to the JSON property `index`
|
|
|
|
# @return [Fixnum]
|
|
|
|
attr_accessor :index
|
|
|
|
|
|
|
|
# The zero-based new index the rule should end up at.
|
|
|
|
# Corresponds to the JSON property `newIndex`
|
|
|
|
# @return [Fixnum]
|
|
|
|
attr_accessor :new_index
|
|
|
|
|
|
|
|
# A rule describing a conditional format.
|
|
|
|
# Corresponds to the JSON property `rule`
|
|
|
|
# @return [Google::Apis::SheetsV4::ConditionalFormatRule]
|
|
|
|
attr_accessor :rule
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The sheet of the rule to move. Required if new_index is set, unused otherwise.
|
2017-07-12 20:10:42 +00:00
|
|
|
# Corresponds to the JSON property `sheetId`
|
|
|
|
# @return [Fixnum]
|
|
|
|
attr_accessor :sheet_id
|
2017-06-02 06:11:31 +00:00
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@index = args[:index] if args.key?(:index)
|
|
|
|
@new_index = args[:new_index] if args.key?(:new_index)
|
|
|
|
@rule = args[:rule] if args.key?(:rule)
|
2017-07-12 20:10:42 +00:00
|
|
|
@sheet_id = args[:sheet_id] if args.key?(:sheet_id)
|
2017-06-02 06:11:31 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-07-12 20:10:42 +00:00
|
|
|
# The result of updating a conditional format rule.
|
|
|
|
class UpdateConditionalFormatRuleResponse
|
2017-06-02 06:11:31 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2017-07-12 20:10:42 +00:00
|
|
|
# The index of the new rule.
|
|
|
|
# Corresponds to the JSON property `newIndex`
|
2017-06-14 17:02:03 +00:00
|
|
|
# @return [Fixnum]
|
2017-07-12 20:10:42 +00:00
|
|
|
attr_accessor :new_index
|
2017-06-02 06:11:31 +00:00
|
|
|
|
2017-07-12 20:10:42 +00:00
|
|
|
# A rule describing a conditional format.
|
|
|
|
# Corresponds to the JSON property `newRule`
|
|
|
|
# @return [Google::Apis::SheetsV4::ConditionalFormatRule]
|
|
|
|
attr_accessor :new_rule
|
2017-06-02 06:11:31 +00:00
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The old index of the rule. Not set if a rule was replaced (because it is the
|
|
|
|
# same as new_index).
|
2017-07-12 20:10:42 +00:00
|
|
|
# Corresponds to the JSON property `oldIndex`
|
2017-06-14 17:02:03 +00:00
|
|
|
# @return [Fixnum]
|
2017-07-12 20:10:42 +00:00
|
|
|
attr_accessor :old_index
|
2017-06-02 06:11:31 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# A rule describing a conditional format.
|
|
|
|
# Corresponds to the JSON property `oldRule`
|
|
|
|
# @return [Google::Apis::SheetsV4::ConditionalFormatRule]
|
|
|
|
attr_accessor :old_rule
|
|
|
|
|
2017-06-02 06:11:31 +00:00
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-07-12 20:10:42 +00:00
|
|
|
@new_index = args[:new_index] if args.key?(:new_index)
|
|
|
|
@new_rule = args[:new_rule] if args.key?(:new_rule)
|
|
|
|
@old_index = args[:old_index] if args.key?(:old_index)
|
2017-08-25 19:54:22 +00:00
|
|
|
@old_rule = args[:old_rule] if args.key?(:old_rule)
|
2017-06-02 06:11:31 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2020-08-28 00:38:58 +00:00
|
|
|
# Updates a data source. After the data source is updated successfully, an
|
2020-09-29 00:38:39 +00:00
|
|
|
# execution is triggered to refresh the associated DATA_SOURCE sheet to read
|
|
|
|
# data from the updated data source. The request requires an additional `
|
|
|
|
# bigquery.readonly` OAuth scope.
|
2020-08-28 00:38:58 +00:00
|
|
|
class UpdateDataSourceRequest
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
|
|
|
# Information about an external data source in the spreadsheet.
|
|
|
|
# Corresponds to the JSON property `dataSource`
|
|
|
|
# @return [Google::Apis::SheetsV4::DataSource]
|
|
|
|
attr_accessor :data_source
|
|
|
|
|
|
|
|
# The fields that should be updated. At least one field must be specified. The
|
2020-09-29 00:38:39 +00:00
|
|
|
# root `dataSource` is implied and should not be specified. A single `"*"` can
|
2020-08-28 00:38:58 +00:00
|
|
|
# be used as short-hand for listing every field.
|
|
|
|
# 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)
|
|
|
|
@data_source = args[:data_source] if args.key?(:data_source)
|
|
|
|
@fields = args[:fields] if args.key?(:fields)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
# The response from updating data source.
|
|
|
|
class UpdateDataSourceResponse
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2020-09-29 00:38:39 +00:00
|
|
|
# The data execution status. A data execution is created to sync a data source
|
|
|
|
# object with the latest data from a DataSource. It is usually scheduled to run
|
|
|
|
# at background, you can check its state to tell if an execution completes There
|
|
|
|
# are several scenarios where a data execution is triggered to run: * Adding a
|
|
|
|
# data source creates an associated data source sheet as well as a data
|
|
|
|
# execution to sync the data from the data source to the sheet. * Updating a
|
|
|
|
# data source creates a data execution to refresh the associated data source
|
|
|
|
# sheet similarly. * You can send refresh request to explicitly refresh one or
|
|
|
|
# multiple data source objects.
|
2020-08-28 00:38:58 +00:00
|
|
|
# Corresponds to the JSON property `dataExecutionStatus`
|
|
|
|
# @return [Google::Apis::SheetsV4::DataExecutionStatus]
|
|
|
|
attr_accessor :data_execution_status
|
|
|
|
|
|
|
|
# Information about an external data source in the spreadsheet.
|
|
|
|
# Corresponds to the JSON property `dataSource`
|
|
|
|
# @return [Google::Apis::SheetsV4::DataSource]
|
|
|
|
attr_accessor :data_source
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@data_execution_status = args[:data_execution_status] if args.key?(:data_execution_status)
|
|
|
|
@data_source = args[:data_source] if args.key?(:data_source)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# A request to update properties of developer metadata. Updates the properties
|
|
|
|
# of the developer metadata selected by the filters to the values provided in
|
|
|
|
# the DeveloperMetadata resource. Callers must specify the properties they wish
|
|
|
|
# to update in the fields parameter, as well as specify at least one DataFilter
|
|
|
|
# matching the metadata they wish to update.
|
2017-09-20 00:35:54 +00:00
|
|
|
class UpdateDeveloperMetadataRequest
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
|
|
|
# The filters matching the developer metadata entries to update.
|
|
|
|
# Corresponds to the JSON property `dataFilters`
|
|
|
|
# @return [Array<Google::Apis::SheetsV4::DataFilter>]
|
|
|
|
attr_accessor :data_filters
|
|
|
|
|
|
|
|
# Developer metadata associated with a location or object in a spreadsheet.
|
2020-08-18 00:38:22 +00:00
|
|
|
# Developer metadata may be used to associate arbitrary data with various parts
|
|
|
|
# of a spreadsheet and will remain associated at those locations as they move
|
|
|
|
# around and the spreadsheet is edited. For example, if developer metadata is
|
|
|
|
# associated with row 5 and another row is then subsequently inserted above row
|
|
|
|
# 5, that original metadata will still be associated with the row it was first
|
|
|
|
# associated with (what is now row 6). If the associated object is deleted its
|
|
|
|
# metadata is deleted too.
|
2017-09-20 00:35:54 +00:00
|
|
|
# Corresponds to the JSON property `developerMetadata`
|
|
|
|
# @return [Google::Apis::SheetsV4::DeveloperMetadata]
|
|
|
|
attr_accessor :developer_metadata
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The fields that should be updated. At least one field must be specified. The
|
|
|
|
# root `developerMetadata` is implied and should not be specified. A single `"*"`
|
|
|
|
# can be used as short-hand for listing every field.
|
2017-09-20 00:35:54 +00:00
|
|
|
# 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)
|
|
|
|
@data_filters = args[:data_filters] if args.key?(:data_filters)
|
|
|
|
@developer_metadata = args[:developer_metadata] if args.key?(:developer_metadata)
|
|
|
|
@fields = args[:fields] if args.key?(:fields)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
# The response from updating developer metadata.
|
|
|
|
class UpdateDeveloperMetadataResponse
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
|
|
|
# The updated developer metadata.
|
|
|
|
# Corresponds to the JSON property `developerMetadata`
|
|
|
|
# @return [Array<Google::Apis::SheetsV4::DeveloperMetadata>]
|
|
|
|
attr_accessor :developer_metadata
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@developer_metadata = args[:developer_metadata] if args.key?(:developer_metadata)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2018-05-08 00:35:49 +00:00
|
|
|
# Updates the state of the specified group.
|
|
|
|
class UpdateDimensionGroupRequest
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
|
|
|
# A group over an interval of rows or columns on a sheet, which can contain or
|
|
|
|
# be contained within other groups. A group can be collapsed or expanded as a
|
|
|
|
# unit on the sheet.
|
|
|
|
# Corresponds to the JSON property `dimensionGroup`
|
|
|
|
# @return [Google::Apis::SheetsV4::DimensionGroup]
|
|
|
|
attr_accessor :dimension_group
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The fields that should be updated. At least one field must be specified. The
|
|
|
|
# root `dimensionGroup` is implied and should not be specified. A single `"*"`
|
|
|
|
# can be used as short-hand for listing every field.
|
2018-05-08 00:35:49 +00:00
|
|
|
# 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)
|
|
|
|
@dimension_group = args[:dimension_group] if args.key?(:dimension_group)
|
|
|
|
@fields = args[:fields] if args.key?(:fields)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Updates properties of dimensions within the specified range.
|
|
|
|
class UpdateDimensionPropertiesRequest
|
2017-06-02 06:11:31 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2020-09-29 00:38:39 +00:00
|
|
|
# A range along a single dimension on a DATA_SOURCE sheet.
|
2020-08-28 00:38:58 +00:00
|
|
|
# Corresponds to the JSON property `dataSourceSheetRange`
|
|
|
|
# @return [Google::Apis::SheetsV4::DataSourceSheetDimensionRange]
|
|
|
|
attr_accessor :data_source_sheet_range
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The fields that should be updated. At least one field must be specified. The
|
|
|
|
# root `properties` is implied and should not be specified. A single `"*"` can
|
|
|
|
# be used as short-hand for listing every field.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `fields`
|
2017-07-12 20:10:42 +00:00
|
|
|
# @return [String]
|
2017-08-25 19:54:22 +00:00
|
|
|
attr_accessor :fields
|
2017-06-14 17:02:03 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Properties about a dimension.
|
|
|
|
# Corresponds to the JSON property `properties`
|
|
|
|
# @return [Google::Apis::SheetsV4::DimensionProperties]
|
|
|
|
attr_accessor :properties
|
2017-06-14 17:02:03 +00:00
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# A range along a single dimension on a sheet. All indexes are zero-based.
|
|
|
|
# Indexes are half open: the start index is inclusive and the end index is
|
|
|
|
# exclusive. Missing indexes indicate the range is unbounded on that side.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `range`
|
|
|
|
# @return [Google::Apis::SheetsV4::DimensionRange]
|
|
|
|
attr_accessor :range
|
2017-06-02 06:11:31 +00:00
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2020-08-28 00:38:58 +00:00
|
|
|
@data_source_sheet_range = args[:data_source_sheet_range] if args.key?(:data_source_sheet_range)
|
2017-08-25 19:54:22 +00:00
|
|
|
@fields = args[:fields] if args.key?(:fields)
|
|
|
|
@properties = args[:properties] if args.key?(:properties)
|
|
|
|
@range = args[:range] if args.key?(:range)
|
2017-06-02 06:11:31 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# Update an embedded object's position (such as a moving or resizing a chart or
|
|
|
|
# image).
|
2017-08-25 19:54:22 +00:00
|
|
|
class UpdateEmbeddedObjectPositionRequest
|
2017-06-02 06:11:31 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The fields of OverlayPosition that should be updated when setting a new
|
|
|
|
# position. Used only if newPosition.overlayPosition is set, in which case at
|
|
|
|
# least one field must be specified. The root `newPosition.overlayPosition` is
|
|
|
|
# implied and should not be specified. A single `"*"` can be used as short-hand
|
|
|
|
# for listing every field.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `fields`
|
2017-07-12 20:10:42 +00:00
|
|
|
# @return [String]
|
2017-08-25 19:54:22 +00:00
|
|
|
attr_accessor :fields
|
2017-06-02 06:11:31 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The position of an embedded object such as a chart.
|
|
|
|
# Corresponds to the JSON property `newPosition`
|
|
|
|
# @return [Google::Apis::SheetsV4::EmbeddedObjectPosition]
|
|
|
|
attr_accessor :new_position
|
2017-06-02 06:11:31 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The ID of the object to moved.
|
|
|
|
# Corresponds to the JSON property `objectId`
|
|
|
|
# @return [Fixnum]
|
|
|
|
attr_accessor :object_id_prop
|
2017-06-02 06:11:31 +00:00
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@fields = args[:fields] if args.key?(:fields)
|
|
|
|
@new_position = args[:new_position] if args.key?(:new_position)
|
|
|
|
@object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop)
|
|
|
|
end
|
|
|
|
end
|
2017-07-12 20:10:42 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The result of updating an embedded object's position.
|
|
|
|
class UpdateEmbeddedObjectPositionResponse
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
|
|
|
# The position of an embedded object such as a chart.
|
|
|
|
# Corresponds to the JSON property `position`
|
|
|
|
# @return [Google::Apis::SheetsV4::EmbeddedObjectPosition]
|
|
|
|
attr_accessor :position
|
2017-06-02 06:11:31 +00:00
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@position = args[:position] if args.key?(:position)
|
2017-06-02 06:11:31 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Updates properties of the filter view.
|
|
|
|
class UpdateFilterViewRequest
|
2017-06-02 06:11:31 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The fields that should be updated. At least one field must be specified. The
|
|
|
|
# root `filter` is implied and should not be specified. A single `"*"` can be
|
|
|
|
# used as short-hand for listing every field.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `fields`
|
2017-07-12 20:10:42 +00:00
|
|
|
# @return [String]
|
2017-08-25 19:54:22 +00:00
|
|
|
attr_accessor :fields
|
|
|
|
|
|
|
|
# A filter view.
|
|
|
|
# Corresponds to the JSON property `filter`
|
|
|
|
# @return [Google::Apis::SheetsV4::FilterView]
|
|
|
|
attr_accessor :filter
|
2017-01-25 07:37:13 +00:00
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@fields = args[:fields] if args.key?(:fields)
|
|
|
|
@filter = args[:filter] if args.key?(:filter)
|
2017-01-25 07:37:13 +00:00
|
|
|
end
|
|
|
|
end
|
2016-05-16 16:49:15 +00:00
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# Updates properties of the named range with the specified namedRangeId.
|
2017-08-25 19:54:22 +00:00
|
|
|
class UpdateNamedRangeRequest
|
2017-03-10 21:11:09 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
2017-01-28 03:38:40 +00:00
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The fields that should be updated. At least one field must be specified. The
|
|
|
|
# root `namedRange` is implied and should not be specified. A single `"*"` can
|
|
|
|
# be used as short-hand for listing every field.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `fields`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :fields
|
2017-05-26 16:44:32 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# A named range.
|
|
|
|
# Corresponds to the JSON property `namedRange`
|
|
|
|
# @return [Google::Apis::SheetsV4::NamedRange]
|
|
|
|
attr_accessor :named_range
|
2017-05-04 19:35:56 +00:00
|
|
|
|
2016-05-16 16:49:15 +00:00
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@fields = args[:fields] if args.key?(:fields)
|
|
|
|
@named_range = args[:named_range] if args.key?(:named_range)
|
2016-05-16 16:49:15 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# Updates an existing protected range with the specified protectedRangeId.
|
2017-08-25 19:54:22 +00:00
|
|
|
class UpdateProtectedRangeRequest
|
2016-05-16 16:49:15 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The fields that should be updated. At least one field must be specified. The
|
|
|
|
# root `protectedRange` is implied and should not be specified. A single `"*"`
|
|
|
|
# can be used as short-hand for listing every field.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `fields`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :fields
|
2017-03-31 19:53:27 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# A protected range.
|
|
|
|
# Corresponds to the JSON property `protectedRange`
|
|
|
|
# @return [Google::Apis::SheetsV4::ProtectedRange]
|
|
|
|
attr_accessor :protected_range
|
2017-07-12 20:10:42 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@fields = args[:fields] if args.key?(:fields)
|
|
|
|
@protected_range = args[:protected_range] if args.key?(:protected_range)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# Updates properties of the sheet with the specified sheetId.
|
2017-08-25 19:54:22 +00:00
|
|
|
class UpdateSheetPropertiesRequest
|
|
|
|
include Google::Apis::Core::Hashable
|
2017-06-14 17:02:03 +00:00
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The fields that should be updated. At least one field must be specified. The
|
|
|
|
# root `properties` is implied and should not be specified. A single `"*"` can
|
|
|
|
# be used as short-hand for listing every field.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `fields`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :fields
|
|
|
|
|
|
|
|
# Properties of a sheet.
|
|
|
|
# Corresponds to the JSON property `properties`
|
|
|
|
# @return [Google::Apis::SheetsV4::SheetProperties]
|
|
|
|
attr_accessor :properties
|
2017-06-02 06:11:31 +00:00
|
|
|
|
2017-02-13 23:28:52 +00:00
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@fields = args[:fields] if args.key?(:fields)
|
|
|
|
@properties = args[:properties] if args.key?(:properties)
|
2017-03-31 19:53:27 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# Updates a slicer's specifications. (This does not move or resize a slicer. To
|
|
|
|
# move or resize a slicer use UpdateEmbeddedObjectPositionRequest.
|
2019-11-05 00:36:31 +00:00
|
|
|
class UpdateSlicerSpecRequest
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The fields that should be updated. At least one field must be specified. The
|
|
|
|
# root `SlicerSpec` is implied and should not be specified. A single "*"` can be
|
|
|
|
# used as short-hand for listing every field.
|
2019-11-05 00:36:31 +00:00
|
|
|
# Corresponds to the JSON property `fields`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :fields
|
|
|
|
|
|
|
|
# The id of the slicer to update.
|
|
|
|
# Corresponds to the JSON property `slicerId`
|
|
|
|
# @return [Fixnum]
|
|
|
|
attr_accessor :slicer_id
|
|
|
|
|
|
|
|
# The specifications of a slicer.
|
|
|
|
# Corresponds to the JSON property `spec`
|
|
|
|
# @return [Google::Apis::SheetsV4::SlicerSpec]
|
|
|
|
attr_accessor :spec
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@fields = args[:fields] if args.key?(:fields)
|
|
|
|
@slicer_id = args[:slicer_id] if args.key?(:slicer_id)
|
|
|
|
@spec = args[:spec] if args.key?(:spec)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Updates properties of a spreadsheet.
|
|
|
|
class UpdateSpreadsheetPropertiesRequest
|
2017-03-31 19:53:27 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The fields that should be updated. At least one field must be specified. The
|
|
|
|
# root 'properties' is implied and should not be specified. A single `"*"` can
|
|
|
|
# be used as short-hand for listing every field.
|
2017-07-12 20:10:42 +00:00
|
|
|
# Corresponds to the JSON property `fields`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :fields
|
2017-06-14 17:02:03 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Properties of a spreadsheet.
|
|
|
|
# Corresponds to the JSON property `properties`
|
|
|
|
# @return [Google::Apis::SheetsV4::SpreadsheetProperties]
|
|
|
|
attr_accessor :properties
|
2017-04-03 20:18:48 +00:00
|
|
|
|
2017-06-02 06:11:31 +00:00
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
2017-05-26 16:44:32 +00:00
|
|
|
|
2017-06-02 06:11:31 +00:00
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-07-12 20:10:42 +00:00
|
|
|
@fields = args[:fields] if args.key?(:fields)
|
2017-08-25 19:54:22 +00:00
|
|
|
@properties = args[:properties] if args.key?(:properties)
|
2017-06-02 06:11:31 +00:00
|
|
|
end
|
|
|
|
end
|
2017-05-26 16:44:32 +00:00
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The response when updating a range of values by a data filter in a spreadsheet.
|
2017-09-20 00:35:54 +00:00
|
|
|
class UpdateValuesByDataFilterResponse
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# Filter that describes what data should be selected or returned from a request.
|
2017-09-20 00:35:54 +00:00
|
|
|
# Corresponds to the JSON property `dataFilter`
|
|
|
|
# @return [Google::Apis::SheetsV4::DataFilter]
|
|
|
|
attr_accessor :data_filter
|
|
|
|
|
|
|
|
# The number of cells updated.
|
|
|
|
# Corresponds to the JSON property `updatedCells`
|
|
|
|
# @return [Fixnum]
|
|
|
|
attr_accessor :updated_cells
|
|
|
|
|
|
|
|
# The number of columns where at least one cell in the column was updated.
|
|
|
|
# Corresponds to the JSON property `updatedColumns`
|
|
|
|
# @return [Fixnum]
|
|
|
|
attr_accessor :updated_columns
|
|
|
|
|
|
|
|
# Data within a range of the spreadsheet.
|
|
|
|
# Corresponds to the JSON property `updatedData`
|
|
|
|
# @return [Google::Apis::SheetsV4::ValueRange]
|
|
|
|
attr_accessor :updated_data
|
|
|
|
|
|
|
|
# The range (in A1 notation) that updates were applied to.
|
|
|
|
# Corresponds to the JSON property `updatedRange`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :updated_range
|
|
|
|
|
|
|
|
# The number of rows where at least one cell in the row was updated.
|
|
|
|
# Corresponds to the JSON property `updatedRows`
|
|
|
|
# @return [Fixnum]
|
|
|
|
attr_accessor :updated_rows
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@data_filter = args[:data_filter] if args.key?(:data_filter)
|
|
|
|
@updated_cells = args[:updated_cells] if args.key?(:updated_cells)
|
|
|
|
@updated_columns = args[:updated_columns] if args.key?(:updated_columns)
|
|
|
|
@updated_data = args[:updated_data] if args.key?(:updated_data)
|
|
|
|
@updated_range = args[:updated_range] if args.key?(:updated_range)
|
|
|
|
@updated_rows = args[:updated_rows] if args.key?(:updated_rows)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The response when updating a range of values in a spreadsheet.
|
|
|
|
class UpdateValuesResponse
|
2017-06-02 06:11:31 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
2017-05-26 16:44:32 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The spreadsheet the updates were applied to.
|
|
|
|
# Corresponds to the JSON property `spreadsheetId`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :spreadsheet_id
|
2017-06-14 17:02:03 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The number of cells updated.
|
|
|
|
# Corresponds to the JSON property `updatedCells`
|
|
|
|
# @return [Fixnum]
|
|
|
|
attr_accessor :updated_cells
|
2017-06-14 17:02:03 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The number of columns where at least one cell in the column was updated.
|
|
|
|
# Corresponds to the JSON property `updatedColumns`
|
|
|
|
# @return [Fixnum]
|
|
|
|
attr_accessor :updated_columns
|
2017-07-12 20:10:42 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Data within a range of the spreadsheet.
|
|
|
|
# Corresponds to the JSON property `updatedData`
|
|
|
|
# @return [Google::Apis::SheetsV4::ValueRange]
|
|
|
|
attr_accessor :updated_data
|
2017-06-14 17:02:03 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The range (in A1 notation) that updates were applied to.
|
|
|
|
# Corresponds to the JSON property `updatedRange`
|
2017-06-14 17:02:03 +00:00
|
|
|
# @return [String]
|
2017-08-25 19:54:22 +00:00
|
|
|
attr_accessor :updated_range
|
2017-07-12 20:10:42 +00:00
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# The number of rows where at least one cell in the row was updated.
|
|
|
|
# Corresponds to the JSON property `updatedRows`
|
|
|
|
# @return [Fixnum]
|
|
|
|
attr_accessor :updated_rows
|
2017-03-31 19:53:27 +00:00
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@spreadsheet_id = args[:spreadsheet_id] if args.key?(:spreadsheet_id)
|
|
|
|
@updated_cells = args[:updated_cells] if args.key?(:updated_cells)
|
|
|
|
@updated_columns = args[:updated_columns] if args.key?(:updated_columns)
|
|
|
|
@updated_data = args[:updated_data] if args.key?(:updated_data)
|
|
|
|
@updated_range = args[:updated_range] if args.key?(:updated_range)
|
|
|
|
@updated_rows = args[:updated_rows] if args.key?(:updated_rows)
|
2017-03-31 19:53:27 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-08-25 19:54:22 +00:00
|
|
|
# Data within a range of the spreadsheet.
|
|
|
|
class ValueRange
|
2017-03-31 19:53:27 +00:00
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# 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`.
|
2017-08-25 19:54:22 +00:00
|
|
|
# When writing, if this field is not set, it defaults to ROWS.
|
|
|
|
# Corresponds to the JSON property `majorDimension`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :major_dimension
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# 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. When appending values, this field represents the range to search
|
|
|
|
# for a table, after which values will be appended.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `range`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :range
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# 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 values will be skipped. To set
|
|
|
|
# a cell to an empty value, set the string value to an empty string.
|
2017-08-25 19:54:22 +00:00
|
|
|
# Corresponds to the JSON property `values`
|
|
|
|
# @return [Array<Array<Object>>]
|
|
|
|
attr_accessor :values
|
2017-03-31 19:53:27 +00:00
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2017-08-25 19:54:22 +00:00
|
|
|
@major_dimension = args[:major_dimension] if args.key?(:major_dimension)
|
|
|
|
@range = args[:range] if args.key?(:range)
|
|
|
|
@values = args[:values] if args.key?(:values)
|
2016-05-16 16:49:15 +00:00
|
|
|
end
|
|
|
|
end
|
2017-12-19 00:35:20 +00:00
|
|
|
|
|
|
|
# Styles for a waterfall chart column.
|
|
|
|
class WaterfallChartColumnStyle
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
|
|
|
# Represents a color in the RGBA color space. This representation is designed
|
|
|
|
# for simplicity of conversion to/from color representations in various
|
2020-08-18 00:38:22 +00:00
|
|
|
# languages over compactness; for example, the fields of this representation can
|
|
|
|
# be trivially provided to the constructor of "java.awt.Color" in Java; it can
|
|
|
|
# also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
|
|
|
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
|
|
|
# CSS "rgba()" string in JavaScript, as well. Note: this proto does not carry
|
|
|
|
# information about the absolute color space that should be used to interpret
|
|
|
|
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
|
|
|
# applications SHOULD assume the sRGB color space. Note: when color equality
|
|
|
|
# needs to be decided, implementations, unless documented otherwise, will treat
|
|
|
|
# two colors to be equal if all their red, green, blue and alpha values each
|
|
|
|
# differ by at most 1e-5. 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(''); `; // ...
|
2017-12-19 00:35:20 +00:00
|
|
|
# Corresponds to the JSON property `color`
|
|
|
|
# @return [Google::Apis::SheetsV4::Color]
|
|
|
|
attr_accessor :color
|
|
|
|
|
2020-01-25 00:37:19 +00:00
|
|
|
# A color value.
|
|
|
|
# Corresponds to the JSON property `colorStyle`
|
|
|
|
# @return [Google::Apis::SheetsV4::ColorStyle]
|
|
|
|
attr_accessor :color_style
|
|
|
|
|
2017-12-19 00:35:20 +00:00
|
|
|
# The label of the column's legend.
|
|
|
|
# Corresponds to the JSON property `label`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :label
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@color = args[:color] if args.key?(:color)
|
2020-01-25 00:37:19 +00:00
|
|
|
@color_style = args[:color_style] if args.key?(:color_style)
|
2017-12-19 00:35:20 +00:00
|
|
|
@label = args[:label] if args.key?(:label)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2018-01-10 00:35:52 +00:00
|
|
|
# A custom subtotal column for a waterfall chart series.
|
|
|
|
class WaterfallChartCustomSubtotal
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# True if the data point at subtotal_index is the subtotal. If false, the
|
|
|
|
# subtotal will be computed and appear after the data point.
|
2018-01-10 00:35:52 +00:00
|
|
|
# Corresponds to the JSON property `dataIsSubtotal`
|
|
|
|
# @return [Boolean]
|
|
|
|
attr_accessor :data_is_subtotal
|
|
|
|
alias_method :data_is_subtotal?, :data_is_subtotal
|
|
|
|
|
|
|
|
# A label for the subtotal column.
|
|
|
|
# Corresponds to the JSON property `label`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :label
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# The 0-based index of a data point within the series. If data_is_subtotal is
|
|
|
|
# true, the data point at this index is the subtotal. Otherwise, the subtotal
|
|
|
|
# appears after the data point with this index. A series can have multiple
|
|
|
|
# subtotals at arbitrary indices, but subtotals do not affect the indices of the
|
|
|
|
# data points. For example, if a series has three data points, their indices
|
|
|
|
# will always be 0, 1, and 2, regardless of how many subtotals exist on the
|
|
|
|
# series or what data points they are associated with.
|
2018-01-10 00:35:52 +00:00
|
|
|
# Corresponds to the JSON property `subtotalIndex`
|
|
|
|
# @return [Fixnum]
|
|
|
|
attr_accessor :subtotal_index
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@data_is_subtotal = args[:data_is_subtotal] if args.key?(:data_is_subtotal)
|
|
|
|
@label = args[:label] if args.key?(:label)
|
|
|
|
@subtotal_index = args[:subtotal_index] if args.key?(:subtotal_index)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-12-19 00:35:20 +00:00
|
|
|
# The domain of a waterfall chart.
|
|
|
|
class WaterfallChartDomain
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
|
|
|
# The data included in a domain or series.
|
|
|
|
# Corresponds to the JSON property `data`
|
|
|
|
# @return [Google::Apis::SheetsV4::ChartData]
|
|
|
|
attr_accessor :data
|
|
|
|
|
|
|
|
# True to reverse the order of the domain values (horizontal axis).
|
|
|
|
# Corresponds to the JSON property `reversed`
|
|
|
|
# @return [Boolean]
|
|
|
|
attr_accessor :reversed
|
|
|
|
alias_method :reversed?, :reversed
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@data = args[:data] if args.key?(:data)
|
|
|
|
@reversed = args[:reversed] if args.key?(:reversed)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
# A single series of data for a waterfall chart.
|
|
|
|
class WaterfallChartSeries
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# Custom subtotal columns appearing in this series. The order in which subtotals
|
|
|
|
# are defined is not significant. Only one subtotal may be defined for each data
|
|
|
|
# point.
|
2018-01-10 00:35:52 +00:00
|
|
|
# Corresponds to the JSON property `customSubtotals`
|
|
|
|
# @return [Array<Google::Apis::SheetsV4::WaterfallChartCustomSubtotal>]
|
|
|
|
attr_accessor :custom_subtotals
|
|
|
|
|
2017-12-19 00:35:20 +00:00
|
|
|
# The data included in a domain or series.
|
|
|
|
# Corresponds to the JSON property `data`
|
|
|
|
# @return [Google::Apis::SheetsV4::ChartData]
|
|
|
|
attr_accessor :data
|
|
|
|
|
2020-08-18 00:38:22 +00:00
|
|
|
# True to hide the subtotal column from the end of the series. By default, a
|
|
|
|
# subtotal column will appear at the end of each series. Setting this field to
|
|
|
|
# true will hide that subtotal column for this series.
|
2017-12-19 00:35:20 +00:00
|
|
|
# Corresponds to the JSON property `hideTrailingSubtotal`
|
|
|
|
# @return [Boolean]
|
|
|
|
attr_accessor :hide_trailing_subtotal
|
|
|
|
alias_method :hide_trailing_subtotal?, :hide_trailing_subtotal
|
|
|
|
|
|
|
|
# Styles for a waterfall chart column.
|
|
|
|
# Corresponds to the JSON property `negativeColumnsStyle`
|
|
|
|
# @return [Google::Apis::SheetsV4::WaterfallChartColumnStyle]
|
|
|
|
attr_accessor :negative_columns_style
|
|
|
|
|
|
|
|
# Styles for a waterfall chart column.
|
|
|
|
# Corresponds to the JSON property `positiveColumnsStyle`
|
|
|
|
# @return [Google::Apis::SheetsV4::WaterfallChartColumnStyle]
|
|
|
|
attr_accessor :positive_columns_style
|
|
|
|
|
|
|
|
# Styles for a waterfall chart column.
|
|
|
|
# Corresponds to the JSON property `subtotalColumnsStyle`
|
|
|
|
# @return [Google::Apis::SheetsV4::WaterfallChartColumnStyle]
|
|
|
|
attr_accessor :subtotal_columns_style
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
2018-01-10 00:35:52 +00:00
|
|
|
@custom_subtotals = args[:custom_subtotals] if args.key?(:custom_subtotals)
|
2017-12-19 00:35:20 +00:00
|
|
|
@data = args[:data] if args.key?(:data)
|
|
|
|
@hide_trailing_subtotal = args[:hide_trailing_subtotal] if args.key?(:hide_trailing_subtotal)
|
|
|
|
@negative_columns_style = args[:negative_columns_style] if args.key?(:negative_columns_style)
|
|
|
|
@positive_columns_style = args[:positive_columns_style] if args.key?(:positive_columns_style)
|
|
|
|
@subtotal_columns_style = args[:subtotal_columns_style] if args.key?(:subtotal_columns_style)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
# A waterfall chart.
|
|
|
|
class WaterfallChartSpec
|
|
|
|
include Google::Apis::Core::Hashable
|
|
|
|
|
|
|
|
# Properties that describe the style of a line.
|
|
|
|
# Corresponds to the JSON property `connectorLineStyle`
|
|
|
|
# @return [Google::Apis::SheetsV4::LineStyle]
|
|
|
|
attr_accessor :connector_line_style
|
|
|
|
|
|
|
|
# The domain of a waterfall chart.
|
|
|
|
# Corresponds to the JSON property `domain`
|
|
|
|
# @return [Google::Apis::SheetsV4::WaterfallChartDomain]
|
|
|
|
attr_accessor :domain
|
|
|
|
|
|
|
|
# True to interpret the first value as a total.
|
|
|
|
# Corresponds to the JSON property `firstValueIsTotal`
|
|
|
|
# @return [Boolean]
|
|
|
|
attr_accessor :first_value_is_total
|
|
|
|
alias_method :first_value_is_total?, :first_value_is_total
|
|
|
|
|
|
|
|
# True to hide connector lines between columns.
|
|
|
|
# Corresponds to the JSON property `hideConnectorLines`
|
|
|
|
# @return [Boolean]
|
|
|
|
attr_accessor :hide_connector_lines
|
|
|
|
alias_method :hide_connector_lines?, :hide_connector_lines
|
|
|
|
|
|
|
|
# The data this waterfall chart is visualizing.
|
|
|
|
# Corresponds to the JSON property `series`
|
|
|
|
# @return [Array<Google::Apis::SheetsV4::WaterfallChartSeries>]
|
|
|
|
attr_accessor :series
|
|
|
|
|
|
|
|
# The stacked type.
|
|
|
|
# Corresponds to the JSON property `stackedType`
|
|
|
|
# @return [String]
|
|
|
|
attr_accessor :stacked_type
|
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
update!(**args)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Update properties of this object
|
|
|
|
def update!(**args)
|
|
|
|
@connector_line_style = args[:connector_line_style] if args.key?(:connector_line_style)
|
|
|
|
@domain = args[:domain] if args.key?(:domain)
|
|
|
|
@first_value_is_total = args[:first_value_is_total] if args.key?(:first_value_is_total)
|
|
|
|
@hide_connector_lines = args[:hide_connector_lines] if args.key?(:hide_connector_lines)
|
|
|
|
@series = args[:series] if args.key?(:series)
|
|
|
|
@stacked_type = args[:stacked_type] if args.key?(:stacked_type)
|
|
|
|
end
|
|
|
|
end
|
2016-05-16 16:49:15 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|