# 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.TargetingExpansionConfig do
  @moduledoc """
  Settings that control the [optimized targeting](//support.google.com/displayvideo/answer/12060859) settings of the line item.

  ## Attributes

  *   `audienceExpansionLevel` (*type:* `String.t`, *default:* `nil`) - Output only. Magnitude of expansion for eligible first-party user lists under this ad group. This field only applies to YouTube and Partners line item and ad group resources.
  *   `audienceExpansionSeedListExcluded` (*type:* `boolean()`, *default:* `nil`) - Output only. Whether to exclude seed list for audience expansion. This field only applies to YouTube and Partners line item and ad group resources.
  *   `enableOptimizedTargeting` (*type:* `boolean()`, *default:* `nil`) - Required. Whether to enable Optimized Targeting for the line item. Optimized targeting is not compatible with all bid strategies. Attempting to set this field to `true` for a line item using the BiddingStrategy field fixed_bid or one of the following combinations of BiddingStrategy fields and BiddingStrategyPerformanceGoalType will result in an error: maximize_auto_spend_bid: * `BIDDING_STRATEGY_PERFORMANCE_GOAL_TYPE_CIVA` * `BIDDING_STRATEGY_PERFORMANCE_GOAL_TYPE_IVO_TEN` * `BIDDING_STRATEGY_PERFORMANCE_GOAL_TYPE_AV_VIEWED` performance_goal_auto_bid: * `BIDDING_STRATEGY_PERFORMANCE_GOAL_TYPE_VIEWABLE_CPM`
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :audienceExpansionLevel => String.t() | nil,
          :audienceExpansionSeedListExcluded => boolean() | nil,
          :enableOptimizedTargeting => boolean() | nil
        }

  field(:audienceExpansionLevel)
  field(:audienceExpansionSeedListExcluded)
  field(:enableOptimizedTargeting)
end

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

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