# 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.YoutubeAndPartnersBiddingStrategy do
  @moduledoc """
  Settings that control the bid strategy for YouTube and Partners resources.

  ## Attributes

  *   `adGroupEffectiveTargetCpaSource` (*type:* `String.t`, *default:* `nil`) - Output only. Source of the effective target CPA value for ad group.
  *   `adGroupEffectiveTargetCpaValue` (*type:* `String.t`, *default:* `nil`) - Output only. The effective target CPA for ad group, in micros of advertiser's currency.
  *   `type` (*type:* `String.t`, *default:* `nil`) - The type of the bidding strategy.
  *   `value` (*type:* `String.t`, *default:* `nil`) - The value used by the bidding strategy. When the bidding strategy is assigned at the line item level, this field is only applicable for the following strategy types: * `YOUTUBE_AND_PARTNERS_BIDDING_STRATEGY_TYPE_TARGET_CPA` * `YOUTUBE_AND_PARTNERS_BIDDING_STRATEGY_TYPE_TARGET_ROAS` When the bidding strategy is assigned at the ad group level, this field is only applicable for the following strategy types: * `YOUTUBE_AND_PARTNERS_BIDDING_STRATEGY_TYPE_MANUAL_CPM` * `YOUTUBE_AND_PARTNERS_BIDDING_STRATEGY_TYPE_MANUAL_CPV` * `YOUTUBE_AND_PARTNERS_BIDDING_STRATEGY_TYPE_TARGET_CPA` * `YOUTUBE_AND_PARTNERS_BIDDING_STRATEGY_TYPE_TARGET_CPM` * `YOUTUBE_AND_PARTNERS_BIDDING_STRATEGY_TYPE_RESERVE_CPM` * `YOUTUBE_AND_PARTNERS_BIDDING_STRATEGY_TYPE_TARGET_ROAS` If not using an applicable strategy, the value of this field will be 0.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :adGroupEffectiveTargetCpaSource => String.t() | nil,
          :adGroupEffectiveTargetCpaValue => String.t() | nil,
          :type => String.t() | nil,
          :value => String.t() | nil
        }

  field(:adGroupEffectiveTargetCpaSource)
  field(:adGroupEffectiveTargetCpaValue)
  field(:type)
  field(:value)
end

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

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