# 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.Drive.V3.Model.LabelFieldModification do
  @moduledoc """
  A modification to a label's field.

  ## Attributes

  *   `fieldId` (*type:* `String.t`, *default:* `nil`) - The ID of the field to be modified.
  *   `kind` (*type:* `String.t`, *default:* `nil`) - This is always drive#labelFieldModification.
  *   `setDateValues` (*type:* `list(Date.t)`, *default:* `nil`) - Replaces the value of a dateString Field with these new values. The string must be in the RFC 3339 full-date format: YYYY-MM-DD.
  *   `setIntegerValues` (*type:* `list(String.t)`, *default:* `nil`) - Replaces the value of an `integer` field with these new values.
  *   `setSelectionValues` (*type:* `list(String.t)`, *default:* `nil`) - Replaces a `selection` field with these new values.
  *   `setTextValues` (*type:* `list(String.t)`, *default:* `nil`) - Sets the value of a `text` field.
  *   `setUserValues` (*type:* `list(String.t)`, *default:* `nil`) - Replaces a `user` field with these new values. The values must be valid email addresses.
  *   `unsetValues` (*type:* `boolean()`, *default:* `nil`) - Unsets the values for this field.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :fieldId => String.t() | nil,
          :kind => String.t() | nil,
          :setDateValues => list(Date.t()) | nil,
          :setIntegerValues => list(String.t()) | nil,
          :setSelectionValues => list(String.t()) | nil,
          :setTextValues => list(String.t()) | nil,
          :setUserValues => list(String.t()) | nil,
          :unsetValues => boolean() | nil
        }

  field(:fieldId)
  field(:kind)
  field(:setDateValues, as: Date, type: :list)
  field(:setIntegerValues, type: :list)
  field(:setSelectionValues, type: :list)
  field(:setTextValues, type: :list)
  field(:setUserValues, type: :list)
  field(:unsetValues)
end

defimpl Poison.Decoder, for: GoogleApi.Drive.V3.Model.LabelFieldModification do
  def decode(value, options) do
    GoogleApi.Drive.V3.Model.LabelFieldModification.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Drive.V3.Model.LabelFieldModification do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
