lib/google_api/display_video/v1/model/audience_group_assigned_targeting_option_details.ex

# 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.V1.Model.AudienceGroupAssignedTargetingOptionDetails do
  @moduledoc """
  Assigned audience group targeting option details. This will be populated in the details field of an AssignedTargetingOption when targeting_type is `TARGETING_TYPE_AUDIENCE_GROUP`. The relation between each group is UNION, except for excluded_first_and_third_party_audience_group and excluded_google_audience_group, of which COMPLEMENT is UNION'ed with other groups.

  ## Attributes

  *   `excludedFirstAndThirdPartyAudienceGroup` (*type:* `GoogleApi.DisplayVideo.V1.Model.FirstAndThirdPartyAudienceGroup.t`, *default:* `nil`) - The first and third party audience ids and recencies of the excluded first and third party audience group. Used for negative targeting. Its COMPLEMENT is used to UNION other audience groups.
  *   `excludedGoogleAudienceGroup` (*type:* `GoogleApi.DisplayVideo.V1.Model.GoogleAudienceGroup.t`, *default:* `nil`) - The Google audience ids of the excluded Google audience group. Used for negative targeting. It's COMPLEMENT is used to UNION other audience groups. Only contains Affinity, In-market and Installed-apps type Google audiences. All items are logically ‘OR’ of each other.
  *   `includedCombinedAudienceGroup` (*type:* `GoogleApi.DisplayVideo.V1.Model.CombinedAudienceGroup.t`, *default:* `nil`) - The combined audience ids of the included combined audience group. Contains combined audience ids only.
  *   `includedCustomListGroup` (*type:* `GoogleApi.DisplayVideo.V1.Model.CustomListGroup.t`, *default:* `nil`) - The custom list ids of the included custom list group. Contains custom list ids only.
  *   `includedFirstAndThirdPartyAudienceGroups` (*type:* `list(GoogleApi.DisplayVideo.V1.Model.FirstAndThirdPartyAudienceGroup.t)`, *default:* `nil`) - The first and third party audience ids and recencies of included first and third party audience groups. Each first and third party audience group contains first and third party audience ids only. The relation between each first and third party audience group is INTERSECTION, and the result is UNION'ed with other audience groups. Repeated groups with same settings will be ignored.
  *   `includedGoogleAudienceGroup` (*type:* `GoogleApi.DisplayVideo.V1.Model.GoogleAudienceGroup.t`, *default:* `nil`) - The Google audience ids of the included Google audience group. Contains Google audience ids only.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :excludedFirstAndThirdPartyAudienceGroup =>
            GoogleApi.DisplayVideo.V1.Model.FirstAndThirdPartyAudienceGroup.t() | nil,
          :excludedGoogleAudienceGroup =>
            GoogleApi.DisplayVideo.V1.Model.GoogleAudienceGroup.t() | nil,
          :includedCombinedAudienceGroup =>
            GoogleApi.DisplayVideo.V1.Model.CombinedAudienceGroup.t() | nil,
          :includedCustomListGroup => GoogleApi.DisplayVideo.V1.Model.CustomListGroup.t() | nil,
          :includedFirstAndThirdPartyAudienceGroups =>
            list(GoogleApi.DisplayVideo.V1.Model.FirstAndThirdPartyAudienceGroup.t()) | nil,
          :includedGoogleAudienceGroup =>
            GoogleApi.DisplayVideo.V1.Model.GoogleAudienceGroup.t() | nil
        }

  field(:excludedFirstAndThirdPartyAudienceGroup,
    as: GoogleApi.DisplayVideo.V1.Model.FirstAndThirdPartyAudienceGroup
  )

  field(:excludedGoogleAudienceGroup, as: GoogleApi.DisplayVideo.V1.Model.GoogleAudienceGroup)
  field(:includedCombinedAudienceGroup, as: GoogleApi.DisplayVideo.V1.Model.CombinedAudienceGroup)
  field(:includedCustomListGroup, as: GoogleApi.DisplayVideo.V1.Model.CustomListGroup)

  field(:includedFirstAndThirdPartyAudienceGroups,
    as: GoogleApi.DisplayVideo.V1.Model.FirstAndThirdPartyAudienceGroup,
    type: :list
  )

  field(:includedGoogleAudienceGroup, as: GoogleApi.DisplayVideo.V1.Model.GoogleAudienceGroup)
end

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

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