# 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.OrgChartSpec do
  @moduledoc """
  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".

  ## Attributes

  *   `labels` (*type:* `GoogleApi.Sheets.V4.Model.ChartData.t`, *default:* `nil`) - The data containing the labels for all the nodes in the chart. Labels must be unique.
  *   `nodeColor` (*type:* `GoogleApi.Sheets.V4.Model.Color.t`, *default:* `nil`) - The color of the org chart nodes. Deprecated: Use node_color_style.
  *   `nodeColorStyle` (*type:* `GoogleApi.Sheets.V4.Model.ColorStyle.t`, *default:* `nil`) - The color of the org chart nodes. If node_color is also set, this field takes precedence.
  *   `nodeSize` (*type:* `String.t`, *default:* `nil`) - The size of the org chart nodes.
  *   `parentLabels` (*type:* `GoogleApi.Sheets.V4.Model.ChartData.t`, *default:* `nil`) - The data containing the label of the parent for the corresponding node. A blank value indicates that the node has no parent and is a top-level node. This field is optional.
  *   `selectedNodeColor` (*type:* `GoogleApi.Sheets.V4.Model.Color.t`, *default:* `nil`) - The color of the selected org chart nodes. Deprecated: Use selected_node_color_style.
  *   `selectedNodeColorStyle` (*type:* `GoogleApi.Sheets.V4.Model.ColorStyle.t`, *default:* `nil`) - The color of the selected org chart nodes. If selected_node_color is also set, this field takes precedence.
  *   `tooltips` (*type:* `GoogleApi.Sheets.V4.Model.ChartData.t`, *default:* `nil`) - The data containing the tooltip for the corresponding node. A blank value results in no tooltip being displayed for the node. This field is optional.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :labels => GoogleApi.Sheets.V4.Model.ChartData.t() | nil,
          :nodeColor => GoogleApi.Sheets.V4.Model.Color.t() | nil,
          :nodeColorStyle => GoogleApi.Sheets.V4.Model.ColorStyle.t() | nil,
          :nodeSize => String.t() | nil,
          :parentLabels => GoogleApi.Sheets.V4.Model.ChartData.t() | nil,
          :selectedNodeColor => GoogleApi.Sheets.V4.Model.Color.t() | nil,
          :selectedNodeColorStyle => GoogleApi.Sheets.V4.Model.ColorStyle.t() | nil,
          :tooltips => GoogleApi.Sheets.V4.Model.ChartData.t() | nil
        }

  field(:labels, as: GoogleApi.Sheets.V4.Model.ChartData)
  field(:nodeColor, as: GoogleApi.Sheets.V4.Model.Color)
  field(:nodeColorStyle, as: GoogleApi.Sheets.V4.Model.ColorStyle)
  field(:nodeSize)
  field(:parentLabels, as: GoogleApi.Sheets.V4.Model.ChartData)
  field(:selectedNodeColor, as: GoogleApi.Sheets.V4.Model.Color)
  field(:selectedNodeColorStyle, as: GoogleApi.Sheets.V4.Model.ColorStyle)
  field(:tooltips, as: GoogleApi.Sheets.V4.Model.ChartData)
end

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

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