# Copyright 2019 Google LLC
#
# 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 file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Sheets.V4.Model.WaterfallChartSeries do
  @moduledoc """
  A single series of data for a waterfall chart.

  ## Attributes

  *   `customSubtotals` (*type:* `list(GoogleApi.Sheets.V4.Model.WaterfallChartCustomSubtotal.t)`, *default:* `nil`) - 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.
  *   `data` (*type:* `GoogleApi.Sheets.V4.Model.ChartData.t`, *default:* `nil`) - The data being visualized in this series.
  *   `dataLabel` (*type:* `GoogleApi.Sheets.V4.Model.DataLabel.t`, *default:* `nil`) - Information about the data labels for this series.
  *   `hideTrailingSubtotal` (*type:* `boolean()`, *default:* `nil`) - 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.
  *   `negativeColumnsStyle` (*type:* `GoogleApi.Sheets.V4.Model.WaterfallChartColumnStyle.t`, *default:* `nil`) - Styles for all columns in this series with negative values.
  *   `positiveColumnsStyle` (*type:* `GoogleApi.Sheets.V4.Model.WaterfallChartColumnStyle.t`, *default:* `nil`) - Styles for all columns in this series with positive values.
  *   `subtotalColumnsStyle` (*type:* `GoogleApi.Sheets.V4.Model.WaterfallChartColumnStyle.t`, *default:* `nil`) - Styles for all subtotal columns in this series.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :customSubtotals =>
            list(GoogleApi.Sheets.V4.Model.WaterfallChartCustomSubtotal.t()) | nil,
          :data => GoogleApi.Sheets.V4.Model.ChartData.t() | nil,
          :dataLabel => GoogleApi.Sheets.V4.Model.DataLabel.t() | nil,
          :hideTrailingSubtotal => boolean() | nil,
          :negativeColumnsStyle => GoogleApi.Sheets.V4.Model.WaterfallChartColumnStyle.t() | nil,
          :positiveColumnsStyle => GoogleApi.Sheets.V4.Model.WaterfallChartColumnStyle.t() | nil,
          :subtotalColumnsStyle => GoogleApi.Sheets.V4.Model.WaterfallChartColumnStyle.t() | nil
        }

  field(:customSubtotals, as: GoogleApi.Sheets.V4.Model.WaterfallChartCustomSubtotal, type: :list)
  field(:data, as: GoogleApi.Sheets.V4.Model.ChartData)
  field(:dataLabel, as: GoogleApi.Sheets.V4.Model.DataLabel)
  field(:hideTrailingSubtotal)
  field(:negativeColumnsStyle, as: GoogleApi.Sheets.V4.Model.WaterfallChartColumnStyle)
  field(:positiveColumnsStyle, as: GoogleApi.Sheets.V4.Model.WaterfallChartColumnStyle)
  field(:subtotalColumnsStyle, as: GoogleApi.Sheets.V4.Model.WaterfallChartColumnStyle)
end

defimpl Poison.Decoder, for: GoogleApi.Sheets.V4.Model.WaterfallChartSeries do
  def decode(value, options) do
    GoogleApi.Sheets.V4.Model.WaterfallChartSeries.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Sheets.V4.Model.WaterfallChartSeries do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
