# 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.IAP.V1.Model.TagsPartialState do
  @moduledoc """


  ## Attributes

  *   `tagKeysToRemove` (*type:* `list(String.t)`, *default:* `nil`) - Keys of the tags that should be removed for evaluation purposes. IMPORTANT: Currently only numeric references are supported. Once support for namespace references is added, both the tag references (numeric and namespace) will be removed.
  *   `tagsToUpsert` (*type:* `map()`, *default:* `nil`) - Tags that’ll be updated or added to the current state of tags for evaluation purposes. If a key exists in both "tags_to_upsert" and "tag_keys_to_remove", the one in "tag_keys_to_remove" is ignored. Only one type of tags reference (numeric or namespace) is required to be passed.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :tagKeysToRemove => list(String.t()) | nil,
          :tagsToUpsert => map() | nil
        }

  field(:tagKeysToRemove, type: :list)
  field(:tagsToUpsert, type: :map)
end

defimpl Poison.Decoder, for: GoogleApi.IAP.V1.Model.TagsPartialState do
  def decode(value, options) do
    GoogleApi.IAP.V1.Model.TagsPartialState.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.IAP.V1.Model.TagsPartialState do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
