# 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.BatchUpdateSpreadsheetRequest do
  @moduledoc """
  The request for updating any aspect of a spreadsheet.

  ## Attributes

  *   `includeSpreadsheetInResponse` (*type:* `boolean()`, *default:* `nil`) - Determines if the update response should include the spreadsheet resource.
  *   `requests` (*type:* `list(GoogleApi.Sheets.V4.Model.Request.t)`, *default:* `nil`) - A list of updates to apply to the spreadsheet. Requests will be applied in the order they are specified. If any request is not valid, no requests will be applied.
  *   `responseIncludeGridData` (*type:* `boolean()`, *default:* `nil`) - True if grid data should be returned. Meaningful only if include_spreadsheet_in_response is 'true'. This parameter is ignored if a field mask was set in the request.
  *   `responseRanges` (*type:* `list(String.t)`, *default:* `nil`) - Limits the ranges included in the response spreadsheet. Meaningful only if include_spreadsheet_in_response is 'true'.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :includeSpreadsheetInResponse => boolean() | nil,
          :requests => list(GoogleApi.Sheets.V4.Model.Request.t()) | nil,
          :responseIncludeGridData => boolean() | nil,
          :responseRanges => list(String.t()) | nil
        }

  field(:includeSpreadsheetInResponse)
  field(:requests, as: GoogleApi.Sheets.V4.Model.Request, type: :list)
  field(:responseIncludeGridData)
  field(:responseRanges, type: :list)
end

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

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