# 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.BatchGetValuesByDataFilterRequest do
  @moduledoc """
  The request for retrieving a range of values in a spreadsheet selected by a set of DataFilters.

  ## Attributes

  *   `dataFilters` (*type:* `list(GoogleApi.Sheets.V4.Model.DataFilter.t)`, *default:* `nil`) - The data filters used to match the ranges of values to retrieve. Ranges that match any of the specified data filters are included in the response.
  *   `dateTimeRenderOption` (*type:* `String.t`, *default:* `nil`) - How dates, times, and durations should be represented in the output. This is ignored if value_render_option is FORMATTED_VALUE. The default dateTime render option is SERIAL_NUMBER.
  *   `majorDimension` (*type:* `String.t`, *default:* `nil`) - The major dimension that results should use. For example, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`, then a request that selects that range and sets `majorDimension=ROWS` returns `[[1,2],[3,4]]`, whereas a request that sets `majorDimension=COLUMNS` returns `[[1,3],[2,4]]`.
  *   `valueRenderOption` (*type:* `String.t`, *default:* `nil`) - How values should be represented in the output. The default render option is FORMATTED_VALUE.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :dataFilters => list(GoogleApi.Sheets.V4.Model.DataFilter.t()) | nil,
          :dateTimeRenderOption => String.t() | nil,
          :majorDimension => String.t() | nil,
          :valueRenderOption => String.t() | nil
        }

  field(:dataFilters, as: GoogleApi.Sheets.V4.Model.DataFilter, type: :list)
  field(:dateTimeRenderOption)
  field(:majorDimension)
  field(:valueRenderOption)
end

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

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