# 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.GetIosPostInstallAttributionRequest do
  @moduledoc """
  Request for iSDK to execute strong match flow for post-install attribution. This is meant for iOS requests only. Requests from other platforms will not be honored.

  ## Attributes

  *   `appInstallationTime` (*type:* `String.t`, *default:* `nil`) - App installation epoch time (https://en.wikipedia.org/wiki/Unix_time). This is a client signal for a more accurate weak match.
  *   `bundleId` (*type:* `String.t`, *default:* `nil`) - APP bundle ID.
  *   `device` (*type:* `GoogleApi.FirebaseDynamicLinks.V1.Model.DeviceInfo.t`, *default:* `nil`) - Device information.
  *   `iosVersion` (*type:* `String.t`, *default:* `nil`) - iOS version, ie: 9.3.5. Consider adding "build".
  *   `retrievalMethod` (*type:* `String.t`, *default:* `nil`) - App post install attribution retrieval information. Disambiguates mechanism (iSDK or developer invoked) to retrieve payload from clicked link.
  *   `sdkVersion` (*type:* `String.t`, *default:* `nil`) - Google SDK version. Version takes the form "$major.$minor.$patch"
  *   `uniqueMatchLinkToCheck` (*type:* `String.t`, *default:* `nil`) - Possible unique matched link that server need to check before performing device heuristics match. If passed link is short server need to expand the link. If link is long server need to vslidate the link.
  *   `visualStyle` (*type:* `String.t`, *default:* `nil`) - Strong match page information. Disambiguates between default UI and custom page to present when strong match succeeds/fails to find cookie.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :appInstallationTime => String.t() | nil,
          :bundleId => String.t() | nil,
          :device => GoogleApi.FirebaseDynamicLinks.V1.Model.DeviceInfo.t() | nil,
          :iosVersion => String.t() | nil,
          :retrievalMethod => String.t() | nil,
          :sdkVersion => String.t() | nil,
          :uniqueMatchLinkToCheck => String.t() | nil,
          :visualStyle => String.t() | nil
        }

  field(:appInstallationTime)
  field(:bundleId)
  field(:device, as: GoogleApi.FirebaseDynamicLinks.V1.Model.DeviceInfo)
  field(:iosVersion)
  field(:retrievalMethod)
  field(:sdkVersion)
  field(:uniqueMatchLinkToCheck)
  field(:visualStyle)
end

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

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