# 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.DynamicLinkInfo do
  @moduledoc """
  Information about a Dynamic Link.

  ## Attributes

  *   `analyticsInfo` (*type:* `GoogleApi.FirebaseDynamicLinks.V1.Model.AnalyticsInfo.t`, *default:* `nil`) - Parameters used for tracking. See all tracking parameters in the [documentation](https://firebase.google.com/docs/dynamic-links/create-manually).
  *   `androidInfo` (*type:* `GoogleApi.FirebaseDynamicLinks.V1.Model.AndroidInfo.t`, *default:* `nil`) - Android related information. See Android related parameters in the [documentation](https://firebase.google.com/docs/dynamic-links/create-manually).
  *   `desktopInfo` (*type:* `GoogleApi.FirebaseDynamicLinks.V1.Model.DesktopInfo.t`, *default:* `nil`) - Desktop related information. See desktop related parameters in the [documentation](https://firebase.google.com/docs/dynamic-links/create-manually).
  *   `domainUriPrefix` (*type:* `String.t`, *default:* `nil`) - E.g. https://maps.app.goo.gl, https://maps.page.link, https://g.co/maps More examples can be found in description of getNormalizedUriPrefix in j/c/g/firebase/dynamiclinks/uri/DdlDomain.java Will fallback to dynamic_link_domain is this field is missing
  *   `dynamicLinkDomain` (*type:* `String.t`, *default:* `nil`) - Dynamic Links domain that the project owns, e.g. abcd.app.goo.gl [Learn more](https://firebase.google.com/docs/dynamic-links/android/receive) on how to set up Dynamic Link domain associated with your Firebase project. Required if missing domain_uri_prefix.
  *   `iosInfo` (*type:* `GoogleApi.FirebaseDynamicLinks.V1.Model.IosInfo.t`, *default:* `nil`) - iOS related information. See iOS related parameters in the [documentation](https://firebase.google.com/docs/dynamic-links/create-manually).
  *   `link` (*type:* `String.t`, *default:* `nil`) - The link your app will open, You can specify any URL your app can handle. This link must be a well-formatted URL, be properly URL-encoded, and use the HTTP or HTTPS scheme. See 'link' parameters in the [documentation](https://firebase.google.com/docs/dynamic-links/create-manually). Required.
  *   `navigationInfo` (*type:* `GoogleApi.FirebaseDynamicLinks.V1.Model.NavigationInfo.t`, *default:* `nil`) - Information of navigation behavior of a Firebase Dynamic Links.
  *   `socialMetaTagInfo` (*type:* `GoogleApi.FirebaseDynamicLinks.V1.Model.SocialMetaTagInfo.t`, *default:* `nil`) - Parameters for social meta tag params. Used to set meta tag data for link previews on social sites.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :analyticsInfo => GoogleApi.FirebaseDynamicLinks.V1.Model.AnalyticsInfo.t() | nil,
          :androidInfo => GoogleApi.FirebaseDynamicLinks.V1.Model.AndroidInfo.t() | nil,
          :desktopInfo => GoogleApi.FirebaseDynamicLinks.V1.Model.DesktopInfo.t() | nil,
          :domainUriPrefix => String.t() | nil,
          :dynamicLinkDomain => String.t() | nil,
          :iosInfo => GoogleApi.FirebaseDynamicLinks.V1.Model.IosInfo.t() | nil,
          :link => String.t() | nil,
          :navigationInfo => GoogleApi.FirebaseDynamicLinks.V1.Model.NavigationInfo.t() | nil,
          :socialMetaTagInfo =>
            GoogleApi.FirebaseDynamicLinks.V1.Model.SocialMetaTagInfo.t() | nil
        }

  field(:analyticsInfo, as: GoogleApi.FirebaseDynamicLinks.V1.Model.AnalyticsInfo)
  field(:androidInfo, as: GoogleApi.FirebaseDynamicLinks.V1.Model.AndroidInfo)
  field(:desktopInfo, as: GoogleApi.FirebaseDynamicLinks.V1.Model.DesktopInfo)
  field(:domainUriPrefix)
  field(:dynamicLinkDomain)
  field(:iosInfo, as: GoogleApi.FirebaseDynamicLinks.V1.Model.IosInfo)
  field(:link)
  field(:navigationInfo, as: GoogleApi.FirebaseDynamicLinks.V1.Model.NavigationInfo)
  field(:socialMetaTagInfo, as: GoogleApi.FirebaseDynamicLinks.V1.Model.SocialMetaTagInfo)
end

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

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