# 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.Fitness.V1.Model.Application do
  @moduledoc """


  ## Attributes

  *   `detailsUrl` (*type:* `String.t`, *default:* `nil`) - An optional URI that can be used to link back to the application.
  *   `name` (*type:* `String.t`, *default:* `nil`) - The name of this application. This is required for REST clients, but we do not enforce uniqueness of this name. It is provided as a matter of convenience for other developers who would like to identify which REST created an Application or Data Source.
  *   `packageName` (*type:* `String.t`, *default:* `nil`) - Package name for this application. This is used as a unique identifier when created by Android applications, but cannot be specified by REST clients. REST clients will have their developer project number reflected into the Data Source data stream IDs, instead of the packageName.
  *   `version` (*type:* `String.t`, *default:* `nil`) - Version of the application. You should update this field whenever the application changes in a way that affects the computation of the data.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :detailsUrl => String.t() | nil,
          :name => String.t() | nil,
          :packageName => String.t() | nil,
          :version => String.t() | nil
        }

  field(:detailsUrl)
  field(:name)
  field(:packageName)
  field(:version)
end

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

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