# 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.YouTube.V3.Model.ActivityContentDetailsPromotedItem do
  @moduledoc """
  Details about a resource which is being promoted.

  ## Attributes

  *   `adTag` (*type:* `String.t`, *default:* `nil`) - The URL the client should fetch to request a promoted item.
  *   `clickTrackingUrl` (*type:* `String.t`, *default:* `nil`) - The URL the client should ping to indicate that the user clicked through on this promoted item.
  *   `creativeViewUrl` (*type:* `String.t`, *default:* `nil`) - The URL the client should ping to indicate that the user was shown this promoted item.
  *   `ctaType` (*type:* `String.t`, *default:* `nil`) - The type of call-to-action, a message to the user indicating action that can be taken.
  *   `customCtaButtonText` (*type:* `String.t`, *default:* `nil`) - The custom call-to-action button text. If specified, it will override the default button text for the cta_type.
  *   `descriptionText` (*type:* `String.t`, *default:* `nil`) - The text description to accompany the promoted item.
  *   `destinationUrl` (*type:* `String.t`, *default:* `nil`) - The URL the client should direct the user to, if the user chooses to visit the advertiser's website.
  *   `forecastingUrl` (*type:* `list(String.t)`, *default:* `nil`) - The list of forecasting URLs. The client should ping all of these URLs when a promoted item is not available, to indicate that a promoted item could have been shown.
  *   `impressionUrl` (*type:* `list(String.t)`, *default:* `nil`) - The list of impression URLs. The client should ping all of these URLs to indicate that the user was shown this promoted item.
  *   `videoId` (*type:* `String.t`, *default:* `nil`) - The ID that YouTube uses to uniquely identify the promoted video.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :adTag => String.t() | nil,
          :clickTrackingUrl => String.t() | nil,
          :creativeViewUrl => String.t() | nil,
          :ctaType => String.t() | nil,
          :customCtaButtonText => String.t() | nil,
          :descriptionText => String.t() | nil,
          :destinationUrl => String.t() | nil,
          :forecastingUrl => list(String.t()) | nil,
          :impressionUrl => list(String.t()) | nil,
          :videoId => String.t() | nil
        }

  field(:adTag)
  field(:clickTrackingUrl)
  field(:creativeViewUrl)
  field(:ctaType)
  field(:customCtaButtonText)
  field(:descriptionText)
  field(:destinationUrl)
  field(:forecastingUrl, type: :list)
  field(:impressionUrl, type: :list)
  field(:videoId)
end

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

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