# 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.Admin.Directory_v1.Model.MobileDeviceApplications do
  @moduledoc """


  ## Attributes

  *   `displayName` (*type:* `String.t`, *default:* `nil`) - The application's display name. An example is `Browser`.
  *   `packageName` (*type:* `String.t`, *default:* `nil`) - The application's package name. An example is `com.android.browser`.
  *   `permission` (*type:* `list(String.t)`, *default:* `nil`) - The list of permissions of this application. These can be either a standard Android permission or one defined by the application, and are found in an application's [Android manifest](https://developer.android.com/guide/topics/manifest/uses-permission-element.html). Examples of a Calendar application's permissions are `READ_CALENDAR`, or `MANAGE_ACCOUNTS`.
  *   `versionCode` (*type:* `integer()`, *default:* `nil`) - The application's version code. An example is `13`.
  *   `versionName` (*type:* `String.t`, *default:* `nil`) - The application's version name. An example is `3.2-140714`.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :displayName => String.t() | nil,
          :packageName => String.t() | nil,
          :permission => list(String.t()) | nil,
          :versionCode => integer() | nil,
          :versionName => String.t() | nil
        }

  field(:displayName)
  field(:packageName)
  field(:permission, type: :list)
  field(:versionCode)
  field(:versionName)
end

defimpl Poison.Decoder, for: GoogleApi.Admin.Directory_v1.Model.MobileDeviceApplications do
  def decode(value, options) do
    GoogleApi.Admin.Directory_v1.Model.MobileDeviceApplications.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Admin.Directory_v1.Model.MobileDeviceApplications do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
