# 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.GalleryReference do
  @moduledoc """
  Represents the link between a custom template and an entry on the Community Template Gallery site.

  ## Attributes

  *   `galleryTemplateId` (*type:* `String.t`, *default:* `nil`) - ID for the gallery template that is generated once during first sync and travels with the template redirects.
  *   `host` (*type:* `String.t`, *default:* `nil`) - The name of the host for the community gallery template.
  *   `isModified` (*type:* `boolean()`, *default:* `nil`) - If a user has manually edited the community gallery template.
  *   `owner` (*type:* `String.t`, *default:* `nil`) - The name of the owner for the community gallery template.
  *   `repository` (*type:* `String.t`, *default:* `nil`) - The name of the repository for the community gallery template.
  *   `signature` (*type:* `String.t`, *default:* `nil`) - The signature of the community gallery template as computed at import time. This value is recomputed whenever the template is updated from the gallery.
  *   `templateDeveloperId` (*type:* `String.t`, *default:* `nil`) - The developer id of the community gallery template. This value is set whenever the template is created from the gallery.
  *   `version` (*type:* `String.t`, *default:* `nil`) - The version of the community gallery template.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :galleryTemplateId => String.t() | nil,
          :host => String.t() | nil,
          :isModified => boolean() | nil,
          :owner => String.t() | nil,
          :repository => String.t() | nil,
          :signature => String.t() | nil,
          :templateDeveloperId => String.t() | nil,
          :version => String.t() | nil
        }

  field(:galleryTemplateId)
  field(:host)
  field(:isModified)
  field(:owner)
  field(:repository)
  field(:signature)
  field(:templateDeveloperId)
  field(:version)
end

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

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