lib/google_api/android_management/v1/model/application_policy.ex

# 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.AndroidManagement.V1.Model.ApplicationPolicy do
  @moduledoc """
  Policy for an individual app.

  ## Attributes

  *   `accessibleTrackIds` (*type:* `list(String.t)`, *default:* `nil`) - List of the app’s track IDs that a device belonging to the enterprise can access. If the list contains multiple track IDs, devices receive the latest version among all accessible tracks. If the list contains no track IDs, devices only have access to the app’s production track. More details about each track are available in AppTrackInfo.
  *   `autoUpdateMode` (*type:* `String.t`, *default:* `nil`) - Controls the auto-update mode for the app.
  *   `connectedWorkAndPersonalApp` (*type:* `String.t`, *default:* `nil`) - Controls whether the app can communicate with itself across a device’s work and personal profiles, subject to user consent.
  *   `defaultPermissionPolicy` (*type:* `String.t`, *default:* `nil`) - The default policy for all permissions requested by the app. If specified, this overrides the policy-level default_permission_policy which applies to all apps. It does not override the permission_grants which applies to all apps.
  *   `delegatedScopes` (*type:* `list(String.t)`, *default:* `nil`) - The scopes delegated to the app from Android Device Policy.
  *   `disabled` (*type:* `boolean()`, *default:* `nil`) - Whether the app is disabled. When disabled, the app data is still preserved.
  *   `extensionConfig` (*type:* `GoogleApi.AndroidManagement.V1.Model.ExtensionConfig.t`, *default:* `nil`) - Configuration to enable this app as an extension app, with the capability of interacting with Android Device Policy offline.This field can be set for at most one app.
  *   `installType` (*type:* `String.t`, *default:* `nil`) - The type of installation to perform.
  *   `lockTaskAllowed` (*type:* `boolean()`, *default:* `nil`) - Whether the app is allowed to lock itself in full-screen mode. DEPRECATED. Use InstallType KIOSK or kioskCustomLauncherEnabled to to configure a dedicated device.
  *   `managedConfiguration` (*type:* `map()`, *default:* `nil`) - Managed configuration applied to the app. The format for the configuration is dictated by the ManagedProperty values supported by the app. Each field name in the managed configuration must match the key field of the ManagedProperty. The field value must be compatible with the type of the ManagedProperty: *type* *JSON value* BOOL true or false STRING string INTEGER number CHOICE string MULTISELECT array of strings HIDDEN string BUNDLE_ARRAY array of objects 
  *   `managedConfigurationTemplate` (*type:* `GoogleApi.AndroidManagement.V1.Model.ManagedConfigurationTemplate.t`, *default:* `nil`) - The managed configurations template for the app, saved from the managed configurations iframe. This field is ignored if managed_configuration is set.
  *   `minimumVersionCode` (*type:* `integer()`, *default:* `nil`) - The minimum version of the app that runs on the device. If set, the device attempts to update the app to at least this version code. If the app is not up-to-date, the device will contain a NonComplianceDetail with non_compliance_reason set to APP_NOT_UPDATED. The app must already be published to Google Play with a version code greater than or equal to this value. At most 20 apps may specify a minimum version code per policy.
  *   `packageName` (*type:* `String.t`, *default:* `nil`) - The package name of the app. For example, com.google.android.youtube for the YouTube app.
  *   `permissionGrants` (*type:* `list(GoogleApi.AndroidManagement.V1.Model.PermissionGrant.t)`, *default:* `nil`) - Explicit permission grants or denials for the app. These values override the default_permission_policy and permission_grants which apply to all apps.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :accessibleTrackIds => list(String.t()) | nil,
          :autoUpdateMode => String.t() | nil,
          :connectedWorkAndPersonalApp => String.t() | nil,
          :defaultPermissionPolicy => String.t() | nil,
          :delegatedScopes => list(String.t()) | nil,
          :disabled => boolean() | nil,
          :extensionConfig => GoogleApi.AndroidManagement.V1.Model.ExtensionConfig.t() | nil,
          :installType => String.t() | nil,
          :lockTaskAllowed => boolean() | nil,
          :managedConfiguration => map() | nil,
          :managedConfigurationTemplate =>
            GoogleApi.AndroidManagement.V1.Model.ManagedConfigurationTemplate.t() | nil,
          :minimumVersionCode => integer() | nil,
          :packageName => String.t() | nil,
          :permissionGrants =>
            list(GoogleApi.AndroidManagement.V1.Model.PermissionGrant.t()) | nil
        }

  field(:accessibleTrackIds, type: :list)
  field(:autoUpdateMode)
  field(:connectedWorkAndPersonalApp)
  field(:defaultPermissionPolicy)
  field(:delegatedScopes, type: :list)
  field(:disabled)
  field(:extensionConfig, as: GoogleApi.AndroidManagement.V1.Model.ExtensionConfig)
  field(:installType)
  field(:lockTaskAllowed)
  field(:managedConfiguration, type: :map)

  field(:managedConfigurationTemplate,
    as: GoogleApi.AndroidManagement.V1.Model.ManagedConfigurationTemplate
  )

  field(:minimumVersionCode)
  field(:packageName)
  field(:permissionGrants, as: GoogleApi.AndroidManagement.V1.Model.PermissionGrant, type: :list)
end

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

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