# 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.RealTimeBidding.V1.Model.AdTechnologyProviders do
  @moduledoc """
  The list of detected Ad Technology Providers for this creative. Bids placed for inventory that will serve to EEA or UK users are expected to comply with GDPR requirements. You must ensure that the creatives used in such bids should contain only user consented ad technology providers as indicated in the bid request. Google reserves the right to filter non-compliant bids. User consented ad technology providers can be found in the [Google Protocol](https://developers.google.com/authorized-buyers/rtb/downloads/realtime-bidding-proto) with the `BidRequest.adslot.consented_providers_settings` field, and can be found as an [OpenRTB extension](https://developers.google.com/authorized-buyers/rtb/downloads/openrtb-adx-proto) with the `BidRequest.user.ext.consented_providers_settings` and `BidRequest.user.ext.consent` fields. See https://support.google.com/authorizedbuyers/answer/9789378 for additional information about the Google TCF v2 integration.

  ## Attributes

  *   `detectedGvlIds` (*type:* `list(String.t)`, *default:* `nil`) - The detected IAB Global Vendor List (GVL) IDs for this creative. See the IAB Global Vendor List at https://vendor-list.consensu.org/v2/vendor-list.json for details about the vendors.
  *   `detectedProviderIds` (*type:* `list(String.t)`, *default:* `nil`) - The detected [Google Ad Tech Providers (ATP)](https://support.google.com/admanager/answer/9012903) for this creative. See https://storage.googleapis.com/adx-rtb-dictionaries/providers.csv for mapping of provider ID to provided name, a privacy policy URL, and a list of domains which can be attributed to the provider.
  *   `unidentifiedProviderDomains` (*type:* `list(String.t)`, *default:* `nil`) - Domains of detected unidentified ad technology providers (if any). You must ensure that the creatives used in bids placed for inventory that will serve to EEA or UK users does not contain unidentified ad technology providers. Google reserves the right to filter non-compliant bids.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :detectedGvlIds => list(String.t()) | nil,
          :detectedProviderIds => list(String.t()) | nil,
          :unidentifiedProviderDomains => list(String.t()) | nil
        }

  field(:detectedGvlIds, type: :list)
  field(:detectedProviderIds, type: :list)
  field(:unidentifiedProviderDomains, type: :list)
end

defimpl Poison.Decoder, for: GoogleApi.RealTimeBidding.V1.Model.AdTechnologyProviders do
  def decode(value, options) do
    GoogleApi.RealTimeBidding.V1.Model.AdTechnologyProviders.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.RealTimeBidding.V1.Model.AdTechnologyProviders do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
