# 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.CreateSdfDownloadTaskRequest do
  @moduledoc """
  Request message for [SdfDownloadTaskService.CreateSdfDownloadTask].

  ## Attributes

  *   `advertiserId` (*type:* `String.t`, *default:* `nil`) - The ID of the advertiser to download SDF for.
  *   `idFilter` (*type:* `GoogleApi.DisplayVideo.V1.Model.IdFilter.t`, *default:* `nil`) - Filters on entities by their entity IDs.
  *   `inventorySourceFilter` (*type:* `GoogleApi.DisplayVideo.V1.Model.InventorySourceFilter.t`, *default:* `nil`) - Filters on Inventory Sources by their IDs.
  *   `parentEntityFilter` (*type:* `GoogleApi.DisplayVideo.V1.Model.ParentEntityFilter.t`, *default:* `nil`) - Filters on selected file types. The entities in each file are filtered by a chosen set of filter entities. The filter entities must be the same type as, or a parent type of, the selected file types.
  *   `partnerId` (*type:* `String.t`, *default:* `nil`) - The ID of the partner to download SDF for.
  *   `version` (*type:* `String.t`, *default:* `nil`) - Required. The SDF version of the downloaded file. If set to `SDF_VERSION_UNSPECIFIED`, this will default to the version specified by the advertiser or partner identified by `root_id`. An advertiser inherits its SDF version from its partner unless configured otherwise.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :advertiserId => String.t() | nil,
          :idFilter => GoogleApi.DisplayVideo.V1.Model.IdFilter.t() | nil,
          :inventorySourceFilter =>
            GoogleApi.DisplayVideo.V1.Model.InventorySourceFilter.t() | nil,
          :parentEntityFilter => GoogleApi.DisplayVideo.V1.Model.ParentEntityFilter.t() | nil,
          :partnerId => String.t() | nil,
          :version => String.t() | nil
        }

  field(:advertiserId)
  field(:idFilter, as: GoogleApi.DisplayVideo.V1.Model.IdFilter)
  field(:inventorySourceFilter, as: GoogleApi.DisplayVideo.V1.Model.InventorySourceFilter)
  field(:parentEntityFilter, as: GoogleApi.DisplayVideo.V1.Model.ParentEntityFilter)
  field(:partnerId)
  field(:version)
end

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

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