Current section

Files

Jump to
google_api_sheets lib google_api sheets v4 model manual_rule.ex
Raw

lib/google_api/sheets/v4/model/manual_rule.ex

# Copyright 2017 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.
# NOTE: This class is auto generated by the swagger code generator program.
# https://github.com/swagger-api/swagger-codegen.git
# Do not edit the class manually.
defmodule GoogleApi.Sheets.V4.Model.ManualRule do
@moduledoc """
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 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 | ... +-----------+-------------------+
## Attributes
- groups ([ManualRuleGroup]): The list of group names and the corresponding items from the source data that map to each group name. Defaults to: `null`.
"""
use GoogleApi.Gax.ModelBase
@type t :: %__MODULE__{
:groups => list(GoogleApi.Sheets.V4.Model.ManualRuleGroup.t())
}
field(:groups, as: GoogleApi.Sheets.V4.Model.ManualRuleGroup, type: :list)
end
defimpl Poison.Decoder, for: GoogleApi.Sheets.V4.Model.ManualRule do
def decode(value, options) do
GoogleApi.Sheets.V4.Model.ManualRule.decode(value, options)
end
end
defimpl Poison.Encoder, for: GoogleApi.Sheets.V4.Model.ManualRule do
def encode(value, options) do
GoogleApi.Gax.ModelBase.encode(value, options)
end
end