# 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.DeleteDuplicatesRequest do
  @moduledoc """
  Removes rows within this range that contain values in the specified columns that are duplicates of values in any previous row. Rows with identical values but different letter cases, formatting, or formulas are considered to be duplicates. This request also removes duplicate rows hidden from view (for example, due to a filter). When removing duplicates, the first instance of each duplicate row scanning from the top downwards is kept in the resulting range. Content outside of the specified range isn't removed, and rows considered duplicates do not have to be adjacent to each other in the range.

  ## Attributes

  *   `comparisonColumns` (*type:* `list(GoogleApi.Sheets.V4.Model.DimensionRange.t)`, *default:* `nil`) - The columns in the range to analyze for duplicate values. If no columns are selected then all columns are analyzed for duplicates.
  *   `range` (*type:* `GoogleApi.Sheets.V4.Model.GridRange.t`, *default:* `nil`) - The range to remove duplicates rows from.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :comparisonColumns => list(GoogleApi.Sheets.V4.Model.DimensionRange.t()) | nil,
          :range => GoogleApi.Sheets.V4.Model.GridRange.t() | nil
        }

  field(:comparisonColumns, as: GoogleApi.Sheets.V4.Model.DimensionRange, type: :list)
  field(:range, as: GoogleApi.Sheets.V4.Model.GridRange)
end

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

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