# 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.TagManager.V2.Model.Entity do
  @moduledoc """
  A workspace entity that may represent a tag, trigger, variable, or folder in addition to its status in the workspace.

  ## Attributes

  *   `builtInVariable` (*type:* `GoogleApi.TagManager.V2.Model.BuiltInVariable.t`, *default:* `nil`) - The built in variable being represented by the entity.
  *   `changeStatus` (*type:* `String.t`, *default:* `nil`) - Represents how the entity has been changed in the workspace.
  *   `client` (*type:* `GoogleApi.TagManager.V2.Model.Client.t`, *default:* `nil`) - The client being represented by the entity.
  *   `customTemplate` (*type:* `GoogleApi.TagManager.V2.Model.CustomTemplate.t`, *default:* `nil`) - The custom template being represented by the entity.
  *   `folder` (*type:* `GoogleApi.TagManager.V2.Model.Folder.t`, *default:* `nil`) - The folder being represented by the entity.
  *   `gtagConfig` (*type:* `GoogleApi.TagManager.V2.Model.GtagConfig.t`, *default:* `nil`) - The gtag config being represented by the entity.
  *   `tag` (*type:* `GoogleApi.TagManager.V2.Model.Tag.t`, *default:* `nil`) - The tag being represented by the entity.
  *   `transformation` (*type:* `GoogleApi.TagManager.V2.Model.Transformation.t`, *default:* `nil`) - The transformation being represented by the entity.
  *   `trigger` (*type:* `GoogleApi.TagManager.V2.Model.Trigger.t`, *default:* `nil`) - The trigger being represented by the entity.
  *   `variable` (*type:* `GoogleApi.TagManager.V2.Model.Variable.t`, *default:* `nil`) - The variable being represented by the entity.
  *   `zone` (*type:* `GoogleApi.TagManager.V2.Model.Zone.t`, *default:* `nil`) - The zone being represented by the entity.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :builtInVariable => GoogleApi.TagManager.V2.Model.BuiltInVariable.t() | nil,
          :changeStatus => String.t() | nil,
          :client => GoogleApi.TagManager.V2.Model.Client.t() | nil,
          :customTemplate => GoogleApi.TagManager.V2.Model.CustomTemplate.t() | nil,
          :folder => GoogleApi.TagManager.V2.Model.Folder.t() | nil,
          :gtagConfig => GoogleApi.TagManager.V2.Model.GtagConfig.t() | nil,
          :tag => GoogleApi.TagManager.V2.Model.Tag.t() | nil,
          :transformation => GoogleApi.TagManager.V2.Model.Transformation.t() | nil,
          :trigger => GoogleApi.TagManager.V2.Model.Trigger.t() | nil,
          :variable => GoogleApi.TagManager.V2.Model.Variable.t() | nil,
          :zone => GoogleApi.TagManager.V2.Model.Zone.t() | nil
        }

  field(:builtInVariable, as: GoogleApi.TagManager.V2.Model.BuiltInVariable)
  field(:changeStatus)
  field(:client, as: GoogleApi.TagManager.V2.Model.Client)
  field(:customTemplate, as: GoogleApi.TagManager.V2.Model.CustomTemplate)
  field(:folder, as: GoogleApi.TagManager.V2.Model.Folder)
  field(:gtagConfig, as: GoogleApi.TagManager.V2.Model.GtagConfig)
  field(:tag, as: GoogleApi.TagManager.V2.Model.Tag)
  field(:transformation, as: GoogleApi.TagManager.V2.Model.Transformation)
  field(:trigger, as: GoogleApi.TagManager.V2.Model.Trigger)
  field(:variable, as: GoogleApi.TagManager.V2.Model.Variable)
  field(:zone, as: GoogleApi.TagManager.V2.Model.Zone)
end

defimpl Poison.Decoder, for: GoogleApi.TagManager.V2.Model.Entity do
  def decode(value, options) do
    GoogleApi.TagManager.V2.Model.Entity.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.TagManager.V2.Model.Entity do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
