# 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.DisplayVideo.V3.Model.AdGroupAd do
  @moduledoc """
  A single ad associated with an ad group.

  ## Attributes

  *   `adGroupAdId` (*type:* `String.t`, *default:* `nil`) - The unique ID of the ad. Assigned by the system.
  *   `adGroupId` (*type:* `String.t`, *default:* `nil`) - The unique ID of the ad group that the ad belongs to.
  *   `adUrls` (*type:* `list(GoogleApi.DisplayVideo.V3.Model.AdUrl.t)`, *default:* `nil`) - List of URLs used by the ad.
  *   `advertiserId` (*type:* `String.t`, *default:* `nil`) - The unique ID of the advertiser the ad belongs to.
  *   `audioAd` (*type:* `GoogleApi.DisplayVideo.V3.Model.AudioAd.t`, *default:* `nil`) - Details of an [audio ad](//support.google.com/displayvideo/answer/6274216) used for reach marketing objectives.
  *   `bumperAd` (*type:* `GoogleApi.DisplayVideo.V3.Model.BumperAd.t`, *default:* `nil`) - Details of a [non-skippable short video ad](//support.google.com/displayvideo/answer/6274216), equal to or less than 6 seconds, used for reach.
  *   `displayName` (*type:* `String.t`, *default:* `nil`) - The display name of the ad. Must be UTF-8 encoded with a maximum size of 255 bytes.
  *   `displayVideoSourceAd` (*type:* `GoogleApi.DisplayVideo.V3.Model.DisplayVideoSourceAd.t`, *default:* `nil`) - Details of an ad sourced from a Display & Video 360 creative.
  *   `entityStatus` (*type:* `String.t`, *default:* `nil`) - The entity status of the ad.
  *   `inStreamAd` (*type:* `GoogleApi.DisplayVideo.V3.Model.InStreamAd.t`, *default:* `nil`) - Details of an [in-stream ad skippable after 5 seconds](//support.google.com/displayvideo/answer/6274216), used for brand awareness or reach marketing objectives.
  *   `mastheadAd` (*type:* `GoogleApi.DisplayVideo.V3.Model.MastheadAd.t`, *default:* `nil`) - Details of an [ad served on the YouTube Home feed](//support.google.com/google-ads/answer/9709826).
  *   `name` (*type:* `String.t`, *default:* `nil`) - The resource name of the ad.
  *   `nonSkippableAd` (*type:* `GoogleApi.DisplayVideo.V3.Model.NonSkippableAd.t`, *default:* `nil`) - Details of a [non-skippable short in-stream video ad](//support.google.com/displayvideo/answer/6274216), between 6 and 15 seconds, used for reach marketing objectives.
  *   `videoDiscoverAd` (*type:* `GoogleApi.DisplayVideo.V3.Model.VideoDiscoveryAd.t`, *default:* `nil`) - Details of an [ad promoting a video](//support.google.com/displayvideo/answer/6274216) that shows in places of discovery.
  *   `videoPerformanceAd` (*type:* `GoogleApi.DisplayVideo.V3.Model.VideoPerformanceAd.t`, *default:* `nil`) - Details of an [ad used in a video action campaign](//support.google.com/google-ads/answer/10147229) to drive actions to the business, service or product.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :adGroupAdId => String.t() | nil,
          :adGroupId => String.t() | nil,
          :adUrls => list(GoogleApi.DisplayVideo.V3.Model.AdUrl.t()) | nil,
          :advertiserId => String.t() | nil,
          :audioAd => GoogleApi.DisplayVideo.V3.Model.AudioAd.t() | nil,
          :bumperAd => GoogleApi.DisplayVideo.V3.Model.BumperAd.t() | nil,
          :displayName => String.t() | nil,
          :displayVideoSourceAd => GoogleApi.DisplayVideo.V3.Model.DisplayVideoSourceAd.t() | nil,
          :entityStatus => String.t() | nil,
          :inStreamAd => GoogleApi.DisplayVideo.V3.Model.InStreamAd.t() | nil,
          :mastheadAd => GoogleApi.DisplayVideo.V3.Model.MastheadAd.t() | nil,
          :name => String.t() | nil,
          :nonSkippableAd => GoogleApi.DisplayVideo.V3.Model.NonSkippableAd.t() | nil,
          :videoDiscoverAd => GoogleApi.DisplayVideo.V3.Model.VideoDiscoveryAd.t() | nil,
          :videoPerformanceAd => GoogleApi.DisplayVideo.V3.Model.VideoPerformanceAd.t() | nil
        }

  field(:adGroupAdId)
  field(:adGroupId)
  field(:adUrls, as: GoogleApi.DisplayVideo.V3.Model.AdUrl, type: :list)
  field(:advertiserId)
  field(:audioAd, as: GoogleApi.DisplayVideo.V3.Model.AudioAd)
  field(:bumperAd, as: GoogleApi.DisplayVideo.V3.Model.BumperAd)
  field(:displayName)
  field(:displayVideoSourceAd, as: GoogleApi.DisplayVideo.V3.Model.DisplayVideoSourceAd)
  field(:entityStatus)
  field(:inStreamAd, as: GoogleApi.DisplayVideo.V3.Model.InStreamAd)
  field(:mastheadAd, as: GoogleApi.DisplayVideo.V3.Model.MastheadAd)
  field(:name)
  field(:nonSkippableAd, as: GoogleApi.DisplayVideo.V3.Model.NonSkippableAd)
  field(:videoDiscoverAd, as: GoogleApi.DisplayVideo.V3.Model.VideoDiscoveryAd)
  field(:videoPerformanceAd, as: GoogleApi.DisplayVideo.V3.Model.VideoPerformanceAd)
end

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

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