# 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.TreemapChartColorScale do
  @moduledoc """
  A color scale for a treemap chart.

  ## Attributes

  *   `maxValueColor` (*type:* `GoogleApi.Sheets.V4.Model.Color.t`, *default:* `nil`) - The background color for cells with a color value greater than or equal to maxValue. Defaults to #109618 if not specified. Deprecated: Use max_value_color_style.
  *   `maxValueColorStyle` (*type:* `GoogleApi.Sheets.V4.Model.ColorStyle.t`, *default:* `nil`) - The background color for cells with a color value greater than or equal to maxValue. Defaults to #109618 if not specified. If max_value_color is also set, this field takes precedence.
  *   `midValueColor` (*type:* `GoogleApi.Sheets.V4.Model.Color.t`, *default:* `nil`) - The background color for cells with a color value at the midpoint between minValue and maxValue. Defaults to #efe6dc if not specified. Deprecated: Use mid_value_color_style.
  *   `midValueColorStyle` (*type:* `GoogleApi.Sheets.V4.Model.ColorStyle.t`, *default:* `nil`) - The background color for cells with a color value at the midpoint between minValue and maxValue. Defaults to #efe6dc if not specified. If mid_value_color is also set, this field takes precedence.
  *   `minValueColor` (*type:* `GoogleApi.Sheets.V4.Model.Color.t`, *default:* `nil`) - The background color for cells with a color value less than or equal to minValue. Defaults to #dc3912 if not specified. Deprecated: Use min_value_color_style.
  *   `minValueColorStyle` (*type:* `GoogleApi.Sheets.V4.Model.ColorStyle.t`, *default:* `nil`) - The background color for cells with a color value less than or equal to minValue. Defaults to #dc3912 if not specified. If min_value_color is also set, this field takes precedence.
  *   `noDataColor` (*type:* `GoogleApi.Sheets.V4.Model.Color.t`, *default:* `nil`) - The background color for cells that have no color data associated with them. Defaults to #000000 if not specified. Deprecated: Use no_data_color_style.
  *   `noDataColorStyle` (*type:* `GoogleApi.Sheets.V4.Model.ColorStyle.t`, *default:* `nil`) - The background color for cells that have no color data associated with them. Defaults to #000000 if not specified. If no_data_color is also set, this field takes precedence.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :maxValueColor => GoogleApi.Sheets.V4.Model.Color.t() | nil,
          :maxValueColorStyle => GoogleApi.Sheets.V4.Model.ColorStyle.t() | nil,
          :midValueColor => GoogleApi.Sheets.V4.Model.Color.t() | nil,
          :midValueColorStyle => GoogleApi.Sheets.V4.Model.ColorStyle.t() | nil,
          :minValueColor => GoogleApi.Sheets.V4.Model.Color.t() | nil,
          :minValueColorStyle => GoogleApi.Sheets.V4.Model.ColorStyle.t() | nil,
          :noDataColor => GoogleApi.Sheets.V4.Model.Color.t() | nil,
          :noDataColorStyle => GoogleApi.Sheets.V4.Model.ColorStyle.t() | nil
        }

  field(:maxValueColor, as: GoogleApi.Sheets.V4.Model.Color)
  field(:maxValueColorStyle, as: GoogleApi.Sheets.V4.Model.ColorStyle)
  field(:midValueColor, as: GoogleApi.Sheets.V4.Model.Color)
  field(:midValueColorStyle, as: GoogleApi.Sheets.V4.Model.ColorStyle)
  field(:minValueColor, as: GoogleApi.Sheets.V4.Model.Color)
  field(:minValueColorStyle, as: GoogleApi.Sheets.V4.Model.ColorStyle)
  field(:noDataColor, as: GoogleApi.Sheets.V4.Model.Color)
  field(:noDataColorStyle, as: GoogleApi.Sheets.V4.Model.ColorStyle)
end

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

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