# 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.AdvertiserSdfConfig do
  @moduledoc """
  Structured Data Files (SDF) settings of an advertiser.

  ## Attributes

  *   `overridePartnerSdfConfig` (*type:* `boolean()`, *default:* `nil`) - Whether or not this advertiser overrides the SDF configuration of its parent partner. By default, an advertiser inherits the SDF configuration from the parent partner. To override the partner configuration, set this field to `true` and provide the new configuration in sdfConfig.
  *   `sdfConfig` (*type:* `GoogleApi.DisplayVideo.V3.Model.SdfConfig.t`, *default:* `nil`) - The SDF configuration for the advertiser. * Required when overridePartnerSdfConfig is `true`. * Output only when overridePartnerSdfConfig is `false`.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :overridePartnerSdfConfig => boolean() | nil,
          :sdfConfig => GoogleApi.DisplayVideo.V3.Model.SdfConfig.t() | nil
        }

  field(:overridePartnerSdfConfig)
  field(:sdfConfig, as: GoogleApi.DisplayVideo.V3.Model.SdfConfig)
end

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

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