# 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.ManualRuleGroup do
  @moduledoc """
  A group name and a list of items from the source data that should be placed in the group with this name.

  ## Attributes

  *   `groupName` (*type:* `GoogleApi.Sheets.V4.Model.ExtendedValue.t`, *default:* `nil`) - The group name, which must be a string. Each group in a given ManualRule must have a unique group name.
  *   `items` (*type:* `list(GoogleApi.Sheets.V4.Model.ExtendedValue.t)`, *default:* `nil`) - The items in the source data that should be placed into this group. Each item may be a string, number, or boolean. Items may appear in at most one group within a given ManualRule. Items that do not appear in any group will appear on their own.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :groupName => GoogleApi.Sheets.V4.Model.ExtendedValue.t() | nil,
          :items => list(GoogleApi.Sheets.V4.Model.ExtendedValue.t()) | nil
        }

  field(:groupName, as: GoogleApi.Sheets.V4.Model.ExtendedValue)
  field(:items, as: GoogleApi.Sheets.V4.Model.ExtendedValue, type: :list)
end

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

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