# 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.FirebaseDynamicLinks.V1.Model.GetIosReopenAttributionResponse do
  @moduledoc """
  Response for iSDK to get reopen attribution for app universal link open deeplinking. This endpoint is meant for only iOS requests.

  ## Attributes

  *   `deepLink` (*type:* `String.t`, *default:* `nil`) - The deep-link attributed the app universal link open. For both regular FDL links and invite FDL links.
  *   `invitationId` (*type:* `String.t`, *default:* `nil`) - Optional invitation ID, for only invite typed requested FDL links.
  *   `iosMinAppVersion` (*type:* `String.t`, *default:* `nil`) - FDL input value of the "&imv=" parameter, minimum app version to be returned to Google Firebase SDK running on iOS-9.
  *   `resolvedLink` (*type:* `String.t`, *default:* `nil`) - The entire FDL, expanded from a short link. It is the same as the requested_link, if it is long.
  *   `utmCampaign` (*type:* `String.t`, *default:* `nil`) - Scion campaign value to be propagated by iSDK to Scion at app-reopen.
  *   `utmContent` (*type:* `String.t`, *default:* `nil`) - Scion content value to be propagated by iSDK to Scion at app-reopen.
  *   `utmMedium` (*type:* `String.t`, *default:* `nil`) - Scion medium value to be propagated by iSDK to Scion at app-reopen.
  *   `utmSource` (*type:* `String.t`, *default:* `nil`) - Scion source value to be propagated by iSDK to Scion at app-reopen.
  *   `utmTerm` (*type:* `String.t`, *default:* `nil`) - Scion term value to be propagated by iSDK to Scion at app-reopen.
  *   `warning` (*type:* `list(GoogleApi.FirebaseDynamicLinks.V1.Model.DynamicLinkWarning.t)`, *default:* `nil`) - Optional warnings associated this API request.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :deepLink => String.t() | nil,
          :invitationId => String.t() | nil,
          :iosMinAppVersion => String.t() | nil,
          :resolvedLink => String.t() | nil,
          :utmCampaign => String.t() | nil,
          :utmContent => String.t() | nil,
          :utmMedium => String.t() | nil,
          :utmSource => String.t() | nil,
          :utmTerm => String.t() | nil,
          :warning => list(GoogleApi.FirebaseDynamicLinks.V1.Model.DynamicLinkWarning.t()) | nil
        }

  field(:deepLink)
  field(:invitationId)
  field(:iosMinAppVersion)
  field(:resolvedLink)
  field(:utmCampaign)
  field(:utmContent)
  field(:utmMedium)
  field(:utmSource)
  field(:utmTerm)
  field(:warning, as: GoogleApi.FirebaseDynamicLinks.V1.Model.DynamicLinkWarning, type: :list)
end

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

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