# 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.CreateShortDynamicLinkRequest do
  @moduledoc """
  Request to create a short Dynamic Link.

  ## Attributes

  *   `dynamicLinkInfo` (*type:* `GoogleApi.FirebaseDynamicLinks.V1.Model.DynamicLinkInfo.t`, *default:* `nil`) - Information about the Dynamic Link to be shortened. [Learn more](https://firebase.google.com/docs/reference/dynamic-links/link-shortener).
  *   `longDynamicLink` (*type:* `String.t`, *default:* `nil`) - Full long Dynamic Link URL with desired query parameters specified. For example, "https://sample.app.goo.gl/?link=http://www.google.com&apn=com.sample", [Learn more](https://firebase.google.com/docs/reference/dynamic-links/link-shortener).
  *   `sdkVersion` (*type:* `String.t`, *default:* `nil`) - Google SDK version. Version takes the form "$major.$minor.$patch"
  *   `suffix` (*type:* `GoogleApi.FirebaseDynamicLinks.V1.Model.Suffix.t`, *default:* `nil`) - Short Dynamic Link suffix. Optional.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :dynamicLinkInfo => GoogleApi.FirebaseDynamicLinks.V1.Model.DynamicLinkInfo.t() | nil,
          :longDynamicLink => String.t() | nil,
          :sdkVersion => String.t() | nil,
          :suffix => GoogleApi.FirebaseDynamicLinks.V1.Model.Suffix.t() | nil
        }

  field(:dynamicLinkInfo, as: GoogleApi.FirebaseDynamicLinks.V1.Model.DynamicLinkInfo)
  field(:longDynamicLink)
  field(:sdkVersion)
  field(:suffix, as: GoogleApi.FirebaseDynamicLinks.V1.Model.Suffix)
end

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

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