# 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.AndroidInfo do
  @moduledoc """
  Android related attributes to the Dynamic Link.

  ## Attributes

  *   `androidFallbackLink` (*type:* `String.t`, *default:* `nil`) - Link to open on Android if the app is not installed.
  *   `androidLink` (*type:* `String.t`, *default:* `nil`) - If specified, this overrides the ‘link’ parameter on Android.
  *   `androidMinPackageVersionCode` (*type:* `String.t`, *default:* `nil`) - Minimum version code for the Android app. If the installed app’s version code is lower, then the user is taken to the Play Store.
  *   `androidPackageName` (*type:* `String.t`, *default:* `nil`) - Android package name of the app.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :androidFallbackLink => String.t() | nil,
          :androidLink => String.t() | nil,
          :androidMinPackageVersionCode => String.t() | nil,
          :androidPackageName => String.t() | nil
        }

  field(:androidFallbackLink)
  field(:androidLink)
  field(:androidMinPackageVersionCode)
  field(:androidPackageName)
end

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

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