# 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.DoubleClickBidManager.V2.Model.QueryMetadata do
  @moduledoc """
  The metadata of the query.

  ## Attributes

  *   `dataRange` (*type:* `GoogleApi.DoubleClickBidManager.V2.Model.DataRange.t`, *default:* `nil`) - The date range the report generated by the query will report on. This date range will be defined by the time zone as used by the advertiser.
  *   `format` (*type:* `String.t`, *default:* `nil`) - The format of the report generated by the query.
  *   `sendNotification` (*type:* `boolean()`, *default:* `nil`) - Whether an email notification is sent to the query creator when a report generated by the query is ready. This value is `false` by default.
  *   `shareEmailAddress` (*type:* `list(String.t)`, *default:* `nil`) - List of additional email addresses with which to share the query. If send_notification is `true`, these email addresses will receive a notification when a report generated by the query is ready. If these email addresses are connected to Display & Video 360 users, the query will be available to them in the Display & Video 360 interface.
  *   `title` (*type:* `String.t`, *default:* `nil`) - The display name of the query. This value will be used in the file name of reports generated by the query.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :dataRange => GoogleApi.DoubleClickBidManager.V2.Model.DataRange.t() | nil,
          :format => String.t() | nil,
          :sendNotification => boolean() | nil,
          :shareEmailAddress => list(String.t()) | nil,
          :title => String.t() | nil
        }

  field(:dataRange, as: GoogleApi.DoubleClickBidManager.V2.Model.DataRange)
  field(:format)
  field(:sendNotification)
  field(:shareEmailAddress, type: :list)
  field(:title)
end

defimpl Poison.Decoder, for: GoogleApi.DoubleClickBidManager.V2.Model.QueryMetadata do
  def decode(value, options) do
    GoogleApi.DoubleClickBidManager.V2.Model.QueryMetadata.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.DoubleClickBidManager.V2.Model.QueryMetadata do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
