# 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.BubbleChartSpec do
  @moduledoc """
  A bubble chart.

  ## Attributes

  *   `bubbleBorderColor` (*type:* `GoogleApi.Sheets.V4.Model.Color.t`, *default:* `nil`) - The bubble border color. Deprecated: Use bubble_border_color_style.
  *   `bubbleBorderColorStyle` (*type:* `GoogleApi.Sheets.V4.Model.ColorStyle.t`, *default:* `nil`) - The bubble border color. If bubble_border_color is also set, this field takes precedence.
  *   `bubbleLabels` (*type:* `GoogleApi.Sheets.V4.Model.ChartData.t`, *default:* `nil`) - The data containing the bubble labels. These do not need to be unique.
  *   `bubbleMaxRadiusSize` (*type:* `integer()`, *default:* `nil`) - The max radius size of the bubbles, in pixels. If specified, the field must be a positive value.
  *   `bubbleMinRadiusSize` (*type:* `integer()`, *default:* `nil`) - The minimum radius size of the bubbles, in pixels. If specific, the field must be a positive value.
  *   `bubbleOpacity` (*type:* `number()`, *default:* `nil`) - The opacity of the bubbles between 0 and 1.0. 0 is fully transparent and 1 is fully opaque.
  *   `bubbleSizes` (*type:* `GoogleApi.Sheets.V4.Model.ChartData.t`, *default:* `nil`) - The data containing the bubble sizes. Bubble sizes are used to draw the bubbles at different sizes relative to each other. If specified, group_ids must also be specified. This field is optional.
  *   `bubbleTextStyle` (*type:* `GoogleApi.Sheets.V4.Model.TextFormat.t`, *default:* `nil`) - The format of the text inside the bubbles. Strikethrough, underline, and link are not supported.
  *   `domain` (*type:* `GoogleApi.Sheets.V4.Model.ChartData.t`, *default:* `nil`) - The data containing the bubble x-values. These values locate the bubbles in the chart horizontally.
  *   `groupIds` (*type:* `GoogleApi.Sheets.V4.Model.ChartData.t`, *default:* `nil`) - The data containing the bubble group IDs. All bubbles with the same group ID are drawn in the same color. If bubble_sizes is specified then this field must also be specified but may contain blank values. This field is optional.
  *   `legendPosition` (*type:* `String.t`, *default:* `nil`) - Where the legend of the chart should be drawn.
  *   `series` (*type:* `GoogleApi.Sheets.V4.Model.ChartData.t`, *default:* `nil`) - The data containing the bubble y-values. These values locate the bubbles in the chart vertically.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :bubbleBorderColor => GoogleApi.Sheets.V4.Model.Color.t() | nil,
          :bubbleBorderColorStyle => GoogleApi.Sheets.V4.Model.ColorStyle.t() | nil,
          :bubbleLabels => GoogleApi.Sheets.V4.Model.ChartData.t() | nil,
          :bubbleMaxRadiusSize => integer() | nil,
          :bubbleMinRadiusSize => integer() | nil,
          :bubbleOpacity => number() | nil,
          :bubbleSizes => GoogleApi.Sheets.V4.Model.ChartData.t() | nil,
          :bubbleTextStyle => GoogleApi.Sheets.V4.Model.TextFormat.t() | nil,
          :domain => GoogleApi.Sheets.V4.Model.ChartData.t() | nil,
          :groupIds => GoogleApi.Sheets.V4.Model.ChartData.t() | nil,
          :legendPosition => String.t() | nil,
          :series => GoogleApi.Sheets.V4.Model.ChartData.t() | nil
        }

  field(:bubbleBorderColor, as: GoogleApi.Sheets.V4.Model.Color)
  field(:bubbleBorderColorStyle, as: GoogleApi.Sheets.V4.Model.ColorStyle)
  field(:bubbleLabels, as: GoogleApi.Sheets.V4.Model.ChartData)
  field(:bubbleMaxRadiusSize)
  field(:bubbleMinRadiusSize)
  field(:bubbleOpacity)
  field(:bubbleSizes, as: GoogleApi.Sheets.V4.Model.ChartData)
  field(:bubbleTextStyle, as: GoogleApi.Sheets.V4.Model.TextFormat)
  field(:domain, as: GoogleApi.Sheets.V4.Model.ChartData)
  field(:groupIds, as: GoogleApi.Sheets.V4.Model.ChartData)
  field(:legendPosition)
  field(:series, as: GoogleApi.Sheets.V4.Model.ChartData)
end

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

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