Android Management API . enterprises . policies

Instance Methods

close()

Close httplib2 connections.

delete(name, x__xgafv=None)

Deletes a policy. This operation is only permitted if no devices are currently referencing the policy.

get(name, x__xgafv=None)

Gets a policy.

list(parent, pageSize=None, pageToken=None, x__xgafv=None)

Lists policies for a given enterprise.

list_next()

Retrieves the next page of results.

patch(name, body=None, updateMask=None, x__xgafv=None)

Updates or creates a policy.

Method Details

close()
Close httplib2 connections.
delete(name, x__xgafv=None)
Deletes a policy. This operation is only permitted if no devices are currently referencing the policy.

Args:
  name: string, The name of the policy in the form enterprises/{enterpriseId}/policies/{policyId}. (required)
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
}
get(name, x__xgafv=None)
Gets a policy.

Args:
  name: string, The name of the policy in the form enterprises/{enterpriseId}/policies/{policyId}. (required)
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # A policy resource represents a group of settings that govern the behavior of a managed device and the apps installed on it.
  "accountTypesWithManagementDisabled": [ # Account types that can't be managed by the user.
    "A String",
  ],
  "addUserDisabled": True or False, # Whether adding new users and profiles is disabled.
  "adjustVolumeDisabled": True or False, # Whether adjusting the master volume is disabled. Also mutes the device.
  "advancedSecurityOverrides": { # Advanced security settings. In most cases, setting these is not needed. # Advanced security settings. In most cases, setting these is not needed.
    "commonCriteriaMode": "A String", # Controls Common Criteria Mode—security standards defined in the Common Criteria for Information Technology Security Evaluation (https://www.commoncriteriaportal.org/) (CC). Enabling Common Criteria Mode increases certain security components on a device, including AES-GCM encryption of Bluetooth Long Term Keys, and Wi-Fi configuration stores.Warning: Common Criteria Mode enforces a strict security model typically only required for IT products used in national security systems and other highly sensitive organizations. Standard device use may be affected. Only enabled if required.
    "developerSettings": "A String", # Controls access to developer settings: developer options and safe boot. Replaces safeBootDisabled (deprecated) and debuggingFeaturesAllowed (deprecated).
    "googlePlayProtectVerifyApps": "A String", # Whether Google Play Protect verification (https://support.google.com/accounts/answer/2812853) is enforced. Replaces ensureVerifyAppsEnabled (deprecated).
    "mtePolicy": "A String", # Optional. Controls Memory Tagging Extension (MTE) (https://source.android.com/docs/security/test/memory-safety/arm-mte) on the device. The device needs to be rebooted to apply changes to the MTE policy.
    "personalAppsThatCanReadWorkNotifications": [ # Personal apps that can read work profile notifications using a NotificationListenerService (https://developer.android.com/reference/android/service/notification/NotificationListenerService). By default, no personal apps (aside from system apps) can read work notifications. Each value in the list must be a package name.
      "A String",
    ],
    "untrustedAppsPolicy": "A String", # The policy for untrusted apps (apps from unknown sources) enforced on the device. Replaces install_unknown_sources_allowed (deprecated).
  },
  "alwaysOnVpnPackage": { # Configuration for an always-on VPN connection. # Configuration for an always-on VPN connection. Use with vpn_config_disabled to prevent modification of this setting.
    "lockdownEnabled": True or False, # Disallows networking when the VPN is not connected.
    "packageName": "A String", # The package name of the VPN app.
  },
  "androidDevicePolicyTracks": [ # This setting is not supported. Any value is ignored.
    "A String",
  ],
  "appAutoUpdatePolicy": "A String", # Recommended alternative: autoUpdateMode which is set per app, provides greater flexibility around update frequency.When autoUpdateMode is set to AUTO_UPDATE_POSTPONED or AUTO_UPDATE_HIGH_PRIORITY, this field has no effect.The app auto update policy, which controls when automatic app updates can be applied.
  "applications": [ # Policy applied to apps. This can have at most 3,000 elements.
    { # Policy for an individual app. Note: Application availability on a given device cannot be changed using this policy if installAppsDisabled is enabled. The maximum number of applications that you can specify per policy is 3,000.
      "accessibleTrackIds": [ # 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.
        "A String",
      ],
      "alwaysOnVpnLockdownExemption": "A String", # Specifies whether the app is allowed networking when the VPN is not connected and alwaysOnVpnPackage.lockdownEnabled is enabled. If set to VPN_LOCKDOWN_ENFORCED, the app is not allowed networking, and if set to VPN_LOCKDOWN_EXEMPTION, the app is allowed networking. Only supported on devices running Android 10 and above. If this is not supported by the device, the device will contain a NonComplianceDetail with non_compliance_reason set to API_LEVEL and a fieldPath. If this is not applicable to the app, the device will contain a NonComplianceDetail with non_compliance_reason set to UNSUPPORTED and a fieldPath. The fieldPath is set to applications[i].alwaysOnVpnLockdownExemption, where i is the index of the package in the applications policy.
      "autoUpdateMode": "A String", # Controls the auto-update mode for the app.
      "connectedWorkAndPersonalApp": "A String", # Controls whether the app can communicate with itself across a device’s work and personal profiles, subject to user consent.
      "credentialProviderPolicy": "A String", # Optional. Whether the app is allowed to act as a credential provider on Android 14 and above.
      "defaultPermissionPolicy": "A String", # 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": [ # The scopes delegated to the app from Android Device Policy. These provide additional privileges for the applications they are applied to.
        "A String",
      ],
      "disabled": True or False, # Whether the app is disabled. When disabled, the app data is still preserved.
      "extensionConfig": { # Configuration to enable an app as an extension app, with the capability of interacting with Android Device Policy offline. For Android versions 13 and above, extension apps are exempt from battery restrictions so will not be placed into the restricted App Standby Bucket (https://developer.android.com/topic/performance/appstandby#restricted-bucket). Extensions apps are also protected against users clearing their data or force-closing the application, although admins can continue to use the clear app data command on extension apps if needed for Android 13 and above. # 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.
        "notificationReceiver": "A String", # Fully qualified class name of the receiver service class for Android Device Policy to notify the extension app of any local command status updates.
        "signingKeyFingerprintsSha256": [ # Hex-encoded SHA-256 hash of the signing certificate of the extension app. Only hexadecimal string representations of 64 characters are valid.If not specified, the signature for the corresponding package name is obtained from the Play Store instead.If this list is empty, the signature of the extension app on the device must match the signature obtained from the Play Store for the app to be able to communicate with Android Device Policy.If this list is not empty, the signature of the extension app on the device must match one of the entries in this list for the app to be able to communicate with Android Device Policy.In production use cases, it is recommended to leave this empty.
          "A String",
        ],
      },
      "installConstraint": [ # Optional. The constraints for installing the app. You can specify a maximum of one InstallConstraint. Multiple constraints are rejected.
        { # Amongst apps with InstallType set to: FORCE_INSTALLED PREINSTALLEDthis defines a set of restrictions for the app installation. At least one of the fields must be set. When multiple fields are set, then all the constraints need to be satisfied for the app to be installed.
          "chargingConstraint": "A String", # Optional. Charging constraint.
          "deviceIdleConstraint": "A String", # Optional. Device idle constraint.
          "networkTypeConstraint": "A String", # Optional. Network type constraint.
        },
      ],
      "installPriority": 42, # Optional. Amongst apps with installType set to: FORCE_INSTALLED PREINSTALLEDthis controls the relative priority of installation. A value of 0 (default) means this app has no priority over other apps. For values between 1 and 10,000, a lower value means a higher priority. Values outside of the range 0 to 10,000 inclusive are rejected.
      "installType": "A String", # The type of installation to perform.
      "lockTaskAllowed": True or False, # Whether the app is allowed to lock itself in full-screen mode. DEPRECATED. Use InstallType KIOSK or kioskCustomLauncherEnabled to configure a dedicated device.
      "managedConfiguration": { # 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
        "a_key": "", # Properties of the object.
      },
      "managedConfigurationTemplate": { # The managed configurations template for the app, saved from the managed configurations iframe. # The managed configurations template for the app, saved from the managed configurations iframe. This field is ignored if managed_configuration is set.
        "configurationVariables": { # Optional, a map containing configuration variables defined for the configuration.
          "a_key": "A String",
        },
        "templateId": "A String", # The ID of the managed configurations template.
      },
      "minimumVersionCode": 42, # 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": "A String", # The package name of the app. For example, com.google.android.youtube for the YouTube app.
      "permissionGrants": [ # Explicit permission grants or denials for the app. These values override the default_permission_policy and permission_grants which apply to all apps.
        { # Configuration for an Android permission and its grant state.
          "permission": "A String", # The Android permission or group, e.g. android.permission.READ_CALENDAR or android.permission_group.CALENDAR.
          "policy": "A String", # The policy for granting the permission.
        },
      ],
      "workProfileWidgets": "A String", # Specifies whether the app installed in the work profile is allowed to add widgets to the home screen.
    },
  ],
  "autoDateAndTimeZone": "A String", # Whether auto date, time, and time zone are enabled on a company-owned device. If this is set, then autoTimeRequired is ignored.
  "autoTimeRequired": True or False, # Whether auto time is required, which prevents the user from manually setting the date and time. If autoDateAndTimeZone is set, this field is ignored.
  "blockApplicationsEnabled": True or False, # Whether applications other than the ones configured in applications are blocked from being installed. When set, applications that were installed under a previous policy but no longer appear in the policy are automatically uninstalled.
  "bluetoothConfigDisabled": True or False, # Whether configuring bluetooth is disabled.
  "bluetoothContactSharingDisabled": True or False, # Whether bluetooth contact sharing is disabled.
  "bluetoothDisabled": True or False, # Whether bluetooth is disabled. Prefer this setting over bluetooth_config_disabled because bluetooth_config_disabled can be bypassed by the user.
  "cameraAccess": "A String", # Controls the use of the camera and whether the user has access to the camera access toggle.
  "cameraDisabled": True or False, # If camera_access is set to any value other than CAMERA_ACCESS_UNSPECIFIED, this has no effect. Otherwise this field controls whether cameras are disabled: If true, all cameras are disabled, otherwise they are available. For fully managed devices this field applies for all apps on the device. For work profiles, this field applies only to apps in the work profile, and the camera access of apps outside the work profile is unaffected.
  "cellBroadcastsConfigDisabled": True or False, # Whether configuring cell broadcast is disabled.
  "choosePrivateKeyRules": [ # Rules for determining apps' access to private keys. See ChoosePrivateKeyRule for details. This must be empty if any application has CERT_SELECTION delegation scope.
    { # Controls apps' access to private keys. The rule determines which private key, if any, Android Device Policy grants to the specified app. Access is granted either when the app calls KeyChain.choosePrivateKeyAlias (https://developer.android.com/reference/android/security/KeyChain#choosePrivateKeyAlias%28android.app.Activity,%20android.security.KeyChainAliasCallback,%20java.lang.String[],%20java.security.Principal[],%20java.lang.String,%20int,%20java.lang.String%29) (or any overloads) to request a private key alias for a given URL, or for rules that are not URL-specific (that is, if urlPattern is not set, or set to the empty string or .*) on Android 11 and above, directly so that the app can call KeyChain.getPrivateKey (https://developer.android.com/reference/android/security/KeyChain#getPrivateKey%28android.content.Context,%20java.lang.String%29), without first having to call KeyChain.choosePrivateKeyAlias.When an app calls KeyChain.choosePrivateKeyAlias if more than one choosePrivateKeyRules matches, the last matching rule defines which key alias to return.
      "packageNames": [ # The package names to which this rule applies. The hash of the signing certificate for each app is verified against the hash provided by Play. If no package names are specified, then the alias is provided to all apps that call KeyChain.choosePrivateKeyAlias (https://developer.android.com/reference/android/security/KeyChain#choosePrivateKeyAlias%28android.app.Activity,%20android.security.KeyChainAliasCallback,%20java.lang.String[],%20java.security.Principal[],%20java.lang.String,%20int,%20java.lang.String%29) or any overloads (but not without calling KeyChain.choosePrivateKeyAlias, even on Android 11 and above). Any app with the same Android UID as a package specified here will have access when they call KeyChain.choosePrivateKeyAlias.
        "A String",
      ],
      "privateKeyAlias": "A String", # The alias of the private key to be used.
      "urlPattern": "A String", # The URL pattern to match against the URL of the request. If not set or empty, it matches all URLs. This uses the regular expression syntax of java.util.regex.Pattern.
    },
  ],
  "complianceRules": [ # Rules declaring which mitigating actions to take when a device is not compliant with its policy. When the conditions for multiple rules are satisfied, all of the mitigating actions for the rules are taken. There is a maximum limit of 100 rules. Use policy enforcement rules instead.
    { # A rule declaring which mitigating actions to take when a device is not compliant with its policy. For every rule, there is always an implicit mitigating action to set policy_compliant to false for the Device resource, and display a message on the device indicating that the device is not compliant with its policy. Other mitigating actions may optionally be taken as well, depending on the field values in the rule.
      "apiLevelCondition": { # A compliance rule condition which is satisfied if the Android Framework API level on the device doesn't meet a minimum requirement. There can only be one rule with this type of condition per policy. # A condition which is satisfied if the Android Framework API level on the device doesn't meet a minimum requirement.
        "minApiLevel": 42, # The minimum desired Android Framework API level. If the device doesn't meet the minimum requirement, this condition is satisfied. Must be greater than zero.
      },
      "disableApps": True or False, # If set to true, the rule includes a mitigating action to disable apps so that the device is effectively disabled, but app data is preserved. If the device is running an app in locked task mode, the app will be closed and a UI showing the reason for non-compliance will be displayed.
      "nonComplianceDetailCondition": { # A compliance rule condition which is satisfied if there exists any matching NonComplianceDetail for the device. A NonComplianceDetail matches a NonComplianceDetailCondition if all the fields which are set within the NonComplianceDetailCondition match the corresponding NonComplianceDetail fields. # A condition which is satisfied if there exists any matching NonComplianceDetail for the device.
        "nonComplianceReason": "A String", # The reason the device is not in compliance with the setting. If not set, then this condition matches any reason.
        "packageName": "A String", # The package name of the app that's out of compliance. If not set, then this condition matches any package name.
        "settingName": "A String", # The name of the policy setting. This is the JSON field name of a top-level Policy field. If not set, then this condition matches any setting name.
      },
      "packageNamesToDisable": [ # If set, the rule includes a mitigating action to disable apps specified in the list, but app data is preserved.
        "A String",
      ],
    },
  ],
  "createWindowsDisabled": True or False, # Whether creating windows besides app windows is disabled.
  "credentialProviderPolicyDefault": "A String", # Controls which apps are allowed to act as credential providers on Android 14 and above. These apps store credentials, see this (https://developer.android.com/training/sign-in/passkeys) and this (https://developer.android.com/reference/androidx/credentials/CredentialManager) for details. See also credentialProviderPolicy.
  "credentialsConfigDisabled": True or False, # Whether configuring user credentials is disabled.
  "crossProfilePolicies": { # Controls the data from the work profile that can be accessed from the personal profile and vice versa. A nonComplianceDetail with MANAGEMENT_MODE is reported if the device does not have a work profile. # Cross-profile policies applied on the device.
    "crossProfileCopyPaste": "A String", # Whether text copied from one profile (personal or work) can be pasted in the other profile.
    "crossProfileDataSharing": "A String", # Whether data from one profile (personal or work) can be shared with apps in the other profile. Specifically controls simple data sharing via intents. Management of other cross-profile communication channels, such as contact search, copy/paste, or connected work & personal apps, are configured separately.
    "exemptionsToShowWorkContactsInPersonalProfile": { # A list of package names. # List of apps which are excluded from the ShowWorkContactsInPersonalProfile setting. For this to be set, ShowWorkContactsInPersonalProfile must be set to one of the following values: SHOW_WORK_CONTACTS_IN_PERSONAL_PROFILE_ALLOWED. In this case, these exemptions act as a blocklist. SHOW_WORK_CONTACTS_IN_PERSONAL_PROFILE_DISALLOWED. In this case, these exemptions act as an allowlist. SHOW_WORK_CONTACTS_IN_PERSONAL_PROFILE_DISALLOWED_EXCEPT_SYSTEM. In this case, these exemptions act as an allowlist, in addition to the already allowlisted system apps.Supported on Android 14 and above. A nonComplianceDetail with API_LEVEL is reported if the Android version is less than 14.
      "packageNames": [ # A list of package names.
        "A String",
      ],
    },
    "showWorkContactsInPersonalProfile": "A String", # Whether personal apps can access contacts stored in the work profile.See also exemptions_to_show_work_contacts_in_personal_profile.
    "workProfileWidgetsDefault": "A String", # Specifies the default behaviour for work profile widgets. If the policy does not specify work_profile_widgets for a specific application, it will behave according to the value specified here.
  },
  "dataRoamingDisabled": True or False, # Whether roaming data services are disabled.
  "debuggingFeaturesAllowed": True or False, # Whether the user is allowed to enable debugging features.
  "defaultPermissionPolicy": "A String", # The default permission policy for runtime permission requests.
  "deviceConnectivityManagement": { # Covers controls for device connectivity such as Wi-Fi, USB data access, keyboard/mouse connections, and more. # Covers controls for device connectivity such as Wi-Fi, USB data access, keyboard/mouse connections, and more.
    "configureWifi": "A String", # Controls Wi-Fi configuring privileges. Based on the option set, user will have either full or limited or no control in configuring Wi-Fi networks.
    "tetheringSettings": "A String", # Controls tethering settings. Based on the value set, the user is partially or fully disallowed from using different forms of tethering.
    "usbDataAccess": "A String", # Controls what files and/or data can be transferred via USB. Supported only on company-owned devices.
    "wifiDirectSettings": "A String", # Controls configuring and using Wi-Fi direct settings. Supported on company-owned devices running Android 13 and above.
    "wifiSsidPolicy": { # Restrictions on which Wi-Fi SSIDs the device can connect to. Note that this does not affect which networks can be configured on the device. Supported on company-owned devices running Android 13 and above. # Restrictions on which Wi-Fi SSIDs the device can connect to. Note that this does not affect which networks can be configured on the device. Supported on company-owned devices running Android 13 and above.
      "wifiSsidPolicyType": "A String", # Type of the Wi-Fi SSID policy to be applied.
      "wifiSsids": [ # Optional. List of Wi-Fi SSIDs that should be applied in the policy. This field must be non-empty when WifiSsidPolicyType is set to WIFI_SSID_ALLOWLIST. If this is set to a non-empty list, then a nonComplianceDetail detail with API_LEVEL is reported if the Android version is less than 13 and a nonComplianceDetail with MANAGEMENT_MODE is reported for non-company-owned devices.
        { # Represents a Wi-Fi SSID.
          "wifiSsid": "A String", # Required. Wi-Fi SSID represented as a string.
        },
      ],
    },
  },
  "deviceOwnerLockScreenInfo": { # Provides a user-facing message with locale info. The maximum message length is 4096 characters. # The device owner information to be shown on the lock screen.
    "defaultMessage": "A String", # The default message displayed if no localized message is specified or the user's locale doesn't match with any of the localized messages. A default message must be provided if any localized messages are provided.
    "localizedMessages": { # A map containing pairs, where locale is a well-formed BCP 47 language (https://www.w3.org/International/articles/language-tags/) code, such as en-US, es-ES, or fr.
      "a_key": "A String",
    },
  },
  "deviceRadioState": { # Controls for device radio settings. # Covers controls for radio state such as Wi-Fi, bluetooth, and more.
    "airplaneModeState": "A String", # Controls whether airplane mode can be toggled by the user or not.
    "cellularTwoGState": "A String", # Controls whether cellular 2G setting can be toggled by the user or not.
    "minimumWifiSecurityLevel": "A String", # The minimum required security level of Wi-Fi networks that the device can connect to.
    "ultraWidebandState": "A String", # Controls the state of the ultra wideband setting and whether the user can toggle it on or off.
    "wifiState": "A String", # Controls current state of Wi-Fi and if user can change its state.
  },
  "encryptionPolicy": "A String", # Whether encryption is enabled
  "ensureVerifyAppsEnabled": True or False, # Whether app verification is force-enabled.
  "factoryResetDisabled": True or False, # Whether factory resetting from settings is disabled.
  "frpAdminEmails": [ # Email addresses of device administrators for factory reset protection. When the device is factory reset, it will require one of these admins to log in with the Google account email and password to unlock the device. If no admins are specified, the device won't provide factory reset protection.
    "A String",
  ],
  "funDisabled": True or False, # Whether the user is allowed to have fun. Controls whether the Easter egg game in Settings is disabled.
  "installAppsDisabled": True or False, # Whether user installation of apps is disabled.
  "installUnknownSourcesAllowed": True or False, # This field has no effect.
  "keyguardDisabled": True or False, # If true, this disables the Lock Screen (https://source.android.com/docs/core/display/multi_display/lock-screen) for primary and/or secondary displays.
  "keyguardDisabledFeatures": [ # Disabled keyguard customizations, such as widgets.
    "A String",
  ],
  "kioskCustomLauncherEnabled": True or False, # Whether the kiosk custom launcher is enabled. This replaces the home screen with a launcher that locks down the device to the apps installed via the applications setting. Apps appear on a single page in alphabetical order. Use kioskCustomization to further configure the kiosk device behavior.
  "kioskCustomization": { # Settings controlling the behavior of a device in kiosk mode. To enable kiosk mode, set kioskCustomLauncherEnabled to true or specify an app in the policy with installType KIOSK. # Settings controlling the behavior of a device in kiosk mode. To enable kiosk mode, set kioskCustomLauncherEnabled to true or specify an app in the policy with installType KIOSK.
    "deviceSettings": "A String", # Specifies whether the Settings app is allowed in kiosk mode.
    "powerButtonActions": "A String", # Sets the behavior of a device in kiosk mode when a user presses and holds (long-presses) the Power button.
    "statusBar": "A String", # Specifies whether system info and notifications are disabled in kiosk mode.
    "systemErrorWarnings": "A String", # Specifies whether system error dialogs for crashed or unresponsive apps are blocked in kiosk mode. When blocked, the system will force-stop the app as if the user chooses the "close app" option on the UI.
    "systemNavigation": "A String", # Specifies which navigation features are enabled (e.g. Home, Overview buttons) in kiosk mode.
  },
  "locationMode": "A String", # The degree of location detection enabled.
  "longSupportMessage": { # Provides a user-facing message with locale info. The maximum message length is 4096 characters. # A message displayed to the user in the device administators settings screen.
    "defaultMessage": "A String", # The default message displayed if no localized message is specified or the user's locale doesn't match with any of the localized messages. A default message must be provided if any localized messages are provided.
    "localizedMessages": { # A map containing pairs, where locale is a well-formed BCP 47 language (https://www.w3.org/International/articles/language-tags/) code, such as en-US, es-ES, or fr.
      "a_key": "A String",
    },
  },
  "maximumTimeToLock": "A String", # Maximum time in milliseconds for user activity until the device locks. A value of 0 means there is no restriction.
  "microphoneAccess": "A String", # Controls the use of the microphone and whether the user has access to the microphone access toggle. This applies only on fully managed devices.
  "minimumApiLevel": 42, # The minimum allowed Android API level.
  "mobileNetworksConfigDisabled": True or False, # Whether configuring mobile networks is disabled.
  "modifyAccountsDisabled": True or False, # Whether adding or removing accounts is disabled.
  "mountPhysicalMediaDisabled": True or False, # Whether the user mounting physical external media is disabled.
  "name": "A String", # The name of the policy in the form enterprises/{enterpriseId}/policies/{policyId}.
  "networkEscapeHatchEnabled": True or False, # Whether the network escape hatch is enabled. If a network connection can't be made at boot time, the escape hatch prompts the user to temporarily connect to a network in order to refresh the device policy. After applying policy, the temporary network will be forgotten and the device will continue booting. This prevents being unable to connect to a network if there is no suitable network in the last policy and the device boots into an app in lock task mode, or the user is otherwise unable to reach device settings.Note: Setting wifiConfigDisabled to true will override this setting under specific circumstances. Please see wifiConfigDisabled for further details. Setting configureWifi to DISALLOW_CONFIGURING_WIFI will override this setting under specific circumstances. Please see DISALLOW_CONFIGURING_WIFI for further details.
  "networkResetDisabled": True or False, # Whether resetting network settings is disabled.
  "oncCertificateProviders": [ # This feature is not generally available.
    { # This feature is not generally available.
      "certificateReferences": [ # This feature is not generally available.
        "A String",
      ],
      "contentProviderEndpoint": { # This feature is not generally available. # This feature is not generally available.
        "packageName": "A String", # This feature is not generally available.
        "signingCertsSha256": [ # Required. This feature is not generally available.
          "A String",
        ],
        "uri": "A String", # This feature is not generally available.
      },
    },
  ],
  "openNetworkConfiguration": { # Network configuration for the device. See configure networks for more information.
    "a_key": "", # Properties of the object.
  },
  "outgoingBeamDisabled": True or False, # Whether using NFC to beam data from apps is disabled.
  "outgoingCallsDisabled": True or False, # Whether outgoing calls are disabled.
  "passwordPolicies": [ # Password requirement policies. Different policies can be set for work profile or fully managed devices by setting the password_scope field in the policy.
    { # Requirements for the password used to unlock a device.
      "maximumFailedPasswordsForWipe": 42, # Number of incorrect device-unlock passwords that can be entered before a device is wiped. A value of 0 means there is no restriction.
      "passwordExpirationTimeout": "A String", # Password expiration timeout.
      "passwordHistoryLength": 42, # The length of the password history. After setting this field, the user won't be able to enter a new password that is the same as any password in the history. A value of 0 means there is no restriction.
      "passwordMinimumLength": 42, # The minimum allowed password length. A value of 0 means there is no restriction. Only enforced when password_quality is NUMERIC, NUMERIC_COMPLEX, ALPHABETIC, ALPHANUMERIC, or COMPLEX.
      "passwordMinimumLetters": 42, # Minimum number of letters required in the password. Only enforced when password_quality is COMPLEX.
      "passwordMinimumLowerCase": 42, # Minimum number of lower case letters required in the password. Only enforced when password_quality is COMPLEX.
      "passwordMinimumNonLetter": 42, # Minimum number of non-letter characters (numerical digits or symbols) required in the password. Only enforced when password_quality is COMPLEX.
      "passwordMinimumNumeric": 42, # Minimum number of numerical digits required in the password. Only enforced when password_quality is COMPLEX.
      "passwordMinimumSymbols": 42, # Minimum number of symbols required in the password. Only enforced when password_quality is COMPLEX.
      "passwordMinimumUpperCase": 42, # Minimum number of upper case letters required in the password. Only enforced when password_quality is COMPLEX.
      "passwordQuality": "A String", # The required password quality.
      "passwordScope": "A String", # The scope that the password requirement applies to.
      "requirePasswordUnlock": "A String", # The length of time after a device or work profile is unlocked using a strong form of authentication (password, PIN, pattern) that it can be unlocked using any other authentication method (e.g. fingerprint, trust agents, face). After the specified time period elapses, only strong forms of authentication can be used to unlock the device or work profile.
      "unifiedLockSettings": "A String", # Controls whether a unified lock is allowed for the device and the work profile, on devices running Android 9 and above with a work profile. This can be set only if password_scope is set to SCOPE_PROFILE, the policy will be rejected otherwise. If user has not set a separate work lock and this field is set to REQUIRE_SEPARATE_WORK_LOCK, a NonComplianceDetail is reported with nonComplianceReason set to USER_ACTION.
    },
  ],
  "passwordRequirements": { # Requirements for the password used to unlock a device. # Password requirements. The field password_requirements.require_password_unlock must not be set. DEPRECATED - Use passwordPolicies.Note:Complexity-based values of PasswordQuality, that is, COMPLEXITY_LOW, COMPLEXITY_MEDIUM, and COMPLEXITY_HIGH, cannot be used here. unified_lock_settings cannot be used here.
    "maximumFailedPasswordsForWipe": 42, # Number of incorrect device-unlock passwords that can be entered before a device is wiped. A value of 0 means there is no restriction.
    "passwordExpirationTimeout": "A String", # Password expiration timeout.
    "passwordHistoryLength": 42, # The length of the password history. After setting this field, the user won't be able to enter a new password that is the same as any password in the history. A value of 0 means there is no restriction.
    "passwordMinimumLength": 42, # The minimum allowed password length. A value of 0 means there is no restriction. Only enforced when password_quality is NUMERIC, NUMERIC_COMPLEX, ALPHABETIC, ALPHANUMERIC, or COMPLEX.
    "passwordMinimumLetters": 42, # Minimum number of letters required in the password. Only enforced when password_quality is COMPLEX.
    "passwordMinimumLowerCase": 42, # Minimum number of lower case letters required in the password. Only enforced when password_quality is COMPLEX.
    "passwordMinimumNonLetter": 42, # Minimum number of non-letter characters (numerical digits or symbols) required in the password. Only enforced when password_quality is COMPLEX.
    "passwordMinimumNumeric": 42, # Minimum number of numerical digits required in the password. Only enforced when password_quality is COMPLEX.
    "passwordMinimumSymbols": 42, # Minimum number of symbols required in the password. Only enforced when password_quality is COMPLEX.
    "passwordMinimumUpperCase": 42, # Minimum number of upper case letters required in the password. Only enforced when password_quality is COMPLEX.
    "passwordQuality": "A String", # The required password quality.
    "passwordScope": "A String", # The scope that the password requirement applies to.
    "requirePasswordUnlock": "A String", # The length of time after a device or work profile is unlocked using a strong form of authentication (password, PIN, pattern) that it can be unlocked using any other authentication method (e.g. fingerprint, trust agents, face). After the specified time period elapses, only strong forms of authentication can be used to unlock the device or work profile.
    "unifiedLockSettings": "A String", # Controls whether a unified lock is allowed for the device and the work profile, on devices running Android 9 and above with a work profile. This can be set only if password_scope is set to SCOPE_PROFILE, the policy will be rejected otherwise. If user has not set a separate work lock and this field is set to REQUIRE_SEPARATE_WORK_LOCK, a NonComplianceDetail is reported with nonComplianceReason set to USER_ACTION.
  },
  "permissionGrants": [ # Explicit permission or group grants or denials for all apps. These values override the default_permission_policy.
    { # Configuration for an Android permission and its grant state.
      "permission": "A String", # The Android permission or group, e.g. android.permission.READ_CALENDAR or android.permission_group.CALENDAR.
      "policy": "A String", # The policy for granting the permission.
    },
  ],
  "permittedAccessibilityServices": { # A list of package names. # Specifies permitted accessibility services. If the field is not set, any accessibility service can be used. If the field is set, only the accessibility services in this list and the system's built-in accessibility service can be used. In particular, if the field is set to empty, only the system's built-in accessibility servicess can be used. This can be set on fully managed devices and on work profiles. When applied to a work profile, this affects both the personal profile and the work profile.
    "packageNames": [ # A list of package names.
      "A String",
    ],
  },
  "permittedInputMethods": { # A list of package names. # If present, only the input methods provided by packages in this list are permitted. If this field is present, but the list is empty, then only system input methods are permitted.
    "packageNames": [ # A list of package names.
      "A String",
    ],
  },
  "persistentPreferredActivities": [ # Default intent handler activities.
    { # A default activity for handling intents that match a particular intent filter. Note: To set up a kiosk, use InstallType to KIOSK rather than use persistent preferred activities.
      "actions": [ # The intent actions to match in the filter. If any actions are included in the filter, then an intent's action must be one of those values for it to match. If no actions are included, the intent action is ignored.
        "A String",
      ],
      "categories": [ # The intent categories to match in the filter. An intent includes the categories that it requires, all of which must be included in the filter in order to match. In other words, adding a category to the filter has no impact on matching unless that category is specified in the intent.
        "A String",
      ],
      "receiverActivity": "A String", # The activity that should be the default intent handler. This should be an Android component name, e.g. com.android.enterprise.app/.MainActivity. Alternatively, the value may be the package name of an app, which causes Android Device Policy to choose an appropriate activity from the app to handle the intent.
    },
  ],
  "personalUsagePolicies": { # Policies controlling personal usage on a company-owned device with a work profile. # Policies managing personal usage on a company-owned device.
    "accountTypesWithManagementDisabled": [ # Account types that can't be managed by the user.
      "A String",
    ],
    "cameraDisabled": True or False, # If true, the camera is disabled on the personal profile.
    "maxDaysWithWorkOff": 42, # Controls how long the work profile can stay off. The minimum duration must be at least 3 days. Other details are as follows: - If the duration is set to 0, the feature is turned off. - If the duration is set to a value smaller than the minimum duration, the feature returns an error. *Note:* If you want to avoid personal profiles being suspended during long periods of off-time, you can temporarily set a large value for this parameter.
    "personalApplications": [ # Policy applied to applications in the personal profile.
      { # Policies for apps in the personal profile of a company-owned device with a work profile.
        "installType": "A String", # The type of installation to perform.
        "packageName": "A String", # The package name of the application.
      },
    ],
    "personalPlayStoreMode": "A String", # Used together with personalApplications to control how apps in the personal profile are allowed or blocked.
    "screenCaptureDisabled": True or False, # If true, screen capture is disabled for all users.
  },
  "playStoreMode": "A String", # This mode controls which apps are available to the user in the Play Store and the behavior on the device when apps are removed from the policy.
  "policyEnforcementRules": [ # Rules that define the behavior when a particular policy can not be applied on device
    { # A rule that defines the actions to take if a device or work profile is not compliant with the policy specified in settingName. In the case of multiple matching or multiple triggered enforcement rules, a merge will occur with the most severe action being taken. However, all triggered rules are still kept track of: this includes initial trigger time and all associated non-compliance details. In the situation where the most severe enforcement rule is satisfied, the next most appropriate action is applied.
      "blockAction": { # An action to block access to apps and data on a fully managed device or in a work profile. This action also triggers a device or work profile to displays a user-facing notification with information (where possible) on how to correct the compliance issue. Note: wipeAction must also be specified. # An action to block access to apps and data on a company owned device or in a work profile. This action also triggers a user-facing notification with information (where possible) on how to correct the compliance issue. Note: wipeAction must also be specified.
        "blockAfterDays": 42, # Number of days the policy is non-compliant before the device or work profile is blocked. To block access immediately, set to 0. blockAfterDays must be less than wipeAfterDays.
        "blockScope": "A String", # Specifies the scope of this BlockAction. Only applicable to devices that are company-owned.
      },
      "settingName": "A String", # The top-level policy to enforce. For example, applications or passwordPolicies.
      "wipeAction": { # An action to reset a company owned device or delete a work profile. Note: blockAction must also be specified. # An action to reset a company owned device or delete a work profile. Note: blockAction must also be specified.
        "preserveFrp": True or False, # Whether the factory-reset protection data is preserved on the device. This setting doesn’t apply to work profiles.
        "wipeAfterDays": 42, # Number of days the policy is non-compliant before the device or work profile is wiped. wipeAfterDays must be greater than blockAfterDays.
      },
    },
  ],
  "preferentialNetworkService": "A String", # Controls whether preferential network service is enabled on the work profile. For example, an organization may have an agreement with a carrier that all of the work data from its employees' devices will be sent via a network service dedicated for enterprise use. An example of a supported preferential network service is the enterprise slice on 5G networks. This has no effect on fully managed devices.
  "printingPolicy": "A String", # Optional. Controls whether printing is allowed. This is supported on devices running Android 9 and above. .
  "privateKeySelectionEnabled": True or False, # Allows showing UI on a device for a user to choose a private key alias if there are no matching rules in ChoosePrivateKeyRules. For devices below Android P, setting this may leave enterprise keys vulnerable. This value will have no effect if any application has CERT_SELECTION delegation scope.
  "recommendedGlobalProxy": { # Configuration info for an HTTP proxy. For a direct proxy, set the host, port, and excluded_hosts fields. For a PAC script proxy, set the pac_uri field. # The network-independent global HTTP proxy. Typically proxies should be configured per-network in open_network_configuration. However for unusual configurations like general internal filtering a global HTTP proxy may be useful. If the proxy is not accessible, network access may break. The global proxy is only a recommendation and some apps may ignore it.
    "excludedHosts": [ # For a direct proxy, the hosts for which the proxy is bypassed. The host names may contain wildcards such as *.example.com.
      "A String",
    ],
    "host": "A String", # The host of the direct proxy.
    "pacUri": "A String", # The URI of the PAC script used to configure the proxy.
    "port": 42, # The port of the direct proxy.
  },
  "removeUserDisabled": True or False, # Whether removing other users is disabled.
  "safeBootDisabled": True or False, # Whether rebooting the device into safe boot is disabled.
  "screenCaptureDisabled": True or False, # Whether screen capture is disabled.
  "setUserIconDisabled": True or False, # Whether changing the user icon is disabled.
  "setWallpaperDisabled": True or False, # Whether changing the wallpaper is disabled.
  "setupActions": [ # Action to take during the setup process. At most one action may be specified.
    { # An action executed during setup.
      "description": { # Provides a user-facing message with locale info. The maximum message length is 4096 characters. # Description of this action.
        "defaultMessage": "A String", # The default message displayed if no localized message is specified or the user's locale doesn't match with any of the localized messages. A default message must be provided if any localized messages are provided.
        "localizedMessages": { # A map containing pairs, where locale is a well-formed BCP 47 language (https://www.w3.org/International/articles/language-tags/) code, such as en-US, es-ES, or fr.
          "a_key": "A String",
        },
      },
      "launchApp": { # An action to launch an app. # An action to launch an app. The app will be launched with an intent containing an extra with key com.google.android.apps.work.clouddpc.EXTRA_LAUNCHED_AS_SETUP_ACTION set to the boolean value true to indicate that this is a setup action flow. If SetupAction references an app, the corresponding installType in the application policy must be set as REQUIRED_FOR_SETUP or said setup will fail.
        "packageName": "A String", # Package name of app to be launched
      },
      "title": { # Provides a user-facing message with locale info. The maximum message length is 4096 characters. # Title of this action.
        "defaultMessage": "A String", # The default message displayed if no localized message is specified or the user's locale doesn't match with any of the localized messages. A default message must be provided if any localized messages are provided.
        "localizedMessages": { # A map containing pairs, where locale is a well-formed BCP 47 language (https://www.w3.org/International/articles/language-tags/) code, such as en-US, es-ES, or fr.
          "a_key": "A String",
        },
      },
    },
  ],
  "shareLocationDisabled": True or False, # Whether location sharing is disabled. share_location_disabled is supported for both fully managed devices and personally owned work profiles.
  "shortSupportMessage": { # Provides a user-facing message with locale info. The maximum message length is 4096 characters. # A message displayed to the user in the settings screen wherever functionality has been disabled by the admin. If the message is longer than 200 characters it may be truncated.
    "defaultMessage": "A String", # The default message displayed if no localized message is specified or the user's locale doesn't match with any of the localized messages. A default message must be provided if any localized messages are provided.
    "localizedMessages": { # A map containing pairs, where locale is a well-formed BCP 47 language (https://www.w3.org/International/articles/language-tags/) code, such as en-US, es-ES, or fr.
      "a_key": "A String",
    },
  },
  "skipFirstUseHintsEnabled": True or False, # Flag to skip hints on the first use. Enterprise admin can enable the system recommendation for apps to skip their user tutorial and other introductory hints on first start-up.
  "smsDisabled": True or False, # Whether sending and receiving SMS messages is disabled.
  "statusBarDisabled": True or False, # Whether the status bar is disabled. This disables notifications, quick settings, and other screen overlays that allow escape from full-screen mode. DEPRECATED. To disable the status bar on a kiosk device, use InstallType KIOSK or kioskCustomLauncherEnabled.
  "statusReportingSettings": { # Settings controlling the behavior of status reports. # Status reporting settings
    "applicationReportingSettings": { # Settings controlling the behavior of application reports. # Application reporting settings. Only applicable if application_reports_enabled is true.
      "includeRemovedApps": True or False, # Whether removed apps are included in application reports.
    },
    "applicationReportsEnabled": True or False, # Whether app reports are enabled.
    "commonCriteriaModeEnabled": True or False, # Whether Common Criteria Mode reporting is enabled.
    "deviceSettingsEnabled": True or False, # Whether device settings reporting is enabled.
    "displayInfoEnabled": True or False, # Whether displays reporting is enabled. Report data is not available for personally owned devices with work profiles.
    "hardwareStatusEnabled": True or False, # Whether hardware status reporting is enabled. Report data is not available for personally owned devices with work profiles.
    "memoryInfoEnabled": True or False, # Whether memory event reporting is enabled.
    "networkInfoEnabled": True or False, # Whether network info reporting is enabled.
    "powerManagementEventsEnabled": True or False, # Whether power management event reporting is enabled. Report data is not available for personally owned devices with work profiles.
    "softwareInfoEnabled": True or False, # Whether software info reporting is enabled.
    "systemPropertiesEnabled": True or False, # Whether system properties reporting is enabled.
  },
  "stayOnPluggedModes": [ # The battery plugged in modes for which the device stays on. When using this setting, it is recommended to clear maximum_time_to_lock so that the device doesn't lock itself while it stays on.
    "A String",
  ],
  "systemUpdate": { # Configuration for managing system updatesNote: Google Play system updates (https://source.android.com/docs/core/ota/modular-system) (also called Mainline updates) are automatically downloaded but require a device reboot to be installed. Refer to the mainline section in Manage system updates (https://developer.android.com/work/dpc/system-updates#mainline) for further details. # The system update policy, which controls how OS updates are applied. If the update type is WINDOWED, the update window will automatically apply to Play app updates as well.Note: Google Play system updates (https://source.android.com/docs/core/ota/modular-system) (also called Mainline updates) are automatically downloaded and require a device reboot to be installed. Refer to the mainline section in Manage system updates (https://developer.android.com/work/dpc/system-updates#mainline) for further details.
    "endMinutes": 42, # If the type is WINDOWED, the end of the maintenance window, measured as the number of minutes after midnight in device's local time. This value must be between 0 and 1439, inclusive. If this value is less than start_minutes, then the maintenance window spans midnight. If the maintenance window specified is smaller than 30 minutes, the actual window is extended to 30 minutes beyond the start time.
    "freezePeriods": [ # An annually repeating time period in which over-the-air (OTA) system updates are postponed to freeze the OS version running on a device. To prevent freezing the device indefinitely, each freeze period must be separated by at least 60 days.
      { # A system freeze period. When a device’s clock is within the freeze period, all incoming system updates (including security patches) are blocked and won’t be installed.When the device is outside any set freeze periods, the normal policy behavior (automatic, windowed, or postponed) applies.Leap years are ignored in freeze period calculations, in particular: If Feb. 29th is set as the start or end date of a freeze period, the freeze period will start or end on Feb. 28th instead. When a device’s system clock reads Feb. 29th, it’s treated as Feb. 28th. When calculating the number of days in a freeze period or the time between two freeze periods, Feb. 29th is ignored and not counted as a day.Note: For Freeze Periods to take effect, SystemUpdateType cannot be specified as SYSTEM_UPDATE_TYPE_UNSPECIFIED, because freeze periods require a defined policy to be specified.
        "endDate": { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: A full date, with non-zero year, month, and day values. A month and day, with a zero year (for example, an anniversary). A year on its own, with a zero month and a zero day. A year and month, with a zero day (for example, a credit card expiration date).Related types: google.type.TimeOfDay google.type.DateTime google.protobuf.Timestamp # The end date (inclusive) of the freeze period. Must be no later than 90 days from the start date. If the end date is earlier than the start date, the freeze period is considered wrapping year-end. Note: year must not be set. For example, {"month": 1,"date": 30}.
          "day": 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.
          "month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
          "year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
        },
        "startDate": { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: A full date, with non-zero year, month, and day values. A month and day, with a zero year (for example, an anniversary). A year on its own, with a zero month and a zero day. A year and month, with a zero day (for example, a credit card expiration date).Related types: google.type.TimeOfDay google.type.DateTime google.protobuf.Timestamp # The start date (inclusive) of the freeze period. Note: year must not be set. For example, {"month": 1,"date": 30}.
          "day": 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.
          "month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
          "year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
        },
      },
    ],
    "startMinutes": 42, # If the type is WINDOWED, the start of the maintenance window, measured as the number of minutes after midnight in the device's local time. This value must be between 0 and 1439, inclusive.
    "type": "A String", # The type of system update to configure.
  },
  "tetheringConfigDisabled": True or False, # Whether configuring tethering and portable hotspots is disabled. If tetheringSettings is set to anything other than TETHERING_SETTINGS_UNSPECIFIED, this setting is ignored.
  "uninstallAppsDisabled": True or False, # Whether user uninstallation of applications is disabled. This prevents apps from being uninstalled, even those removed using applications
  "unmuteMicrophoneDisabled": True or False, # If microphone_access is set to any value other than MICROPHONE_ACCESS_UNSPECIFIED, this has no effect. Otherwise this field controls whether microphones are disabled: If true, all microphones are disabled, otherwise they are available. This is available only on fully managed devices.
  "usageLog": { # Controls types of device activity logs collected from the device and reported via Pub/Sub notification (https://developers.google.com/android/management/notifications). # Configuration of device activity logging.
    "enabledLogTypes": [ # Specifies which log types are enabled. Note that users will receive on-device messaging when usage logging is enabled.
      "A String",
    ],
    "uploadOnCellularAllowed": [ # Specifies which of the enabled log types can be uploaded over mobile data. By default logs are queued for upload when the device connects to WiFi.
      "A String",
    ],
  },
  "usbFileTransferDisabled": True or False, # Whether transferring files over USB is disabled. This is supported only on company-owned devices.
  "usbMassStorageEnabled": True or False, # Whether USB storage is enabled. Deprecated.
  "version": "A String", # The version of the policy. This is a read-only field. The version is incremented each time the policy is updated.
  "vpnConfigDisabled": True or False, # Whether configuring VPN is disabled.
  "wifiConfigDisabled": True or False, # Whether configuring Wi-Fi networks is disabled. Supported on fully managed devices and work profiles on company-owned devices. For fully managed devices, setting this to true removes all configured networks and retains only the networks configured using openNetworkConfiguration. For work profiles on company-owned devices, existing configured networks are not affected and the user is not allowed to add, remove, or modify Wi-Fi networks. If configureWifi is set to anything other than CONFIGURE_WIFI_UNSPECIFIED, this setting is ignored. Note: If a network connection can't be made at boot time and configuring Wi-Fi is disabled then network escape hatch will be shown in order to refresh the device policy (see networkEscapeHatchEnabled).
  "wifiConfigsLockdownEnabled": True or False, # DEPRECATED - Use wifi_config_disabled.
}
list(parent, pageSize=None, pageToken=None, x__xgafv=None)
Lists policies for a given enterprise.

Args:
  parent: string, The name of the enterprise in the form enterprises/{enterpriseId}. (required)
  pageSize: integer, The requested page size. The actual page size may be fixed to a min or max value.
  pageToken: string, A token identifying a page of results returned by the server.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Response to a request to list policies for a given enterprise.
  "nextPageToken": "A String", # If there are more results, a token to retrieve next page of results.
  "policies": [ # The list of policies.
    { # A policy resource represents a group of settings that govern the behavior of a managed device and the apps installed on it.
      "accountTypesWithManagementDisabled": [ # Account types that can't be managed by the user.
        "A String",
      ],
      "addUserDisabled": True or False, # Whether adding new users and profiles is disabled.
      "adjustVolumeDisabled": True or False, # Whether adjusting the master volume is disabled. Also mutes the device.
      "advancedSecurityOverrides": { # Advanced security settings. In most cases, setting these is not needed. # Advanced security settings. In most cases, setting these is not needed.
        "commonCriteriaMode": "A String", # Controls Common Criteria Mode—security standards defined in the Common Criteria for Information Technology Security Evaluation (https://www.commoncriteriaportal.org/) (CC). Enabling Common Criteria Mode increases certain security components on a device, including AES-GCM encryption of Bluetooth Long Term Keys, and Wi-Fi configuration stores.Warning: Common Criteria Mode enforces a strict security model typically only required for IT products used in national security systems and other highly sensitive organizations. Standard device use may be affected. Only enabled if required.
        "developerSettings": "A String", # Controls access to developer settings: developer options and safe boot. Replaces safeBootDisabled (deprecated) and debuggingFeaturesAllowed (deprecated).
        "googlePlayProtectVerifyApps": "A String", # Whether Google Play Protect verification (https://support.google.com/accounts/answer/2812853) is enforced. Replaces ensureVerifyAppsEnabled (deprecated).
        "mtePolicy": "A String", # Optional. Controls Memory Tagging Extension (MTE) (https://source.android.com/docs/security/test/memory-safety/arm-mte) on the device. The device needs to be rebooted to apply changes to the MTE policy.
        "personalAppsThatCanReadWorkNotifications": [ # Personal apps that can read work profile notifications using a NotificationListenerService (https://developer.android.com/reference/android/service/notification/NotificationListenerService). By default, no personal apps (aside from system apps) can read work notifications. Each value in the list must be a package name.
          "A String",
        ],
        "untrustedAppsPolicy": "A String", # The policy for untrusted apps (apps from unknown sources) enforced on the device. Replaces install_unknown_sources_allowed (deprecated).
      },
      "alwaysOnVpnPackage": { # Configuration for an always-on VPN connection. # Configuration for an always-on VPN connection. Use with vpn_config_disabled to prevent modification of this setting.
        "lockdownEnabled": True or False, # Disallows networking when the VPN is not connected.
        "packageName": "A String", # The package name of the VPN app.
      },
      "androidDevicePolicyTracks": [ # This setting is not supported. Any value is ignored.
        "A String",
      ],
      "appAutoUpdatePolicy": "A String", # Recommended alternative: autoUpdateMode which is set per app, provides greater flexibility around update frequency.When autoUpdateMode is set to AUTO_UPDATE_POSTPONED or AUTO_UPDATE_HIGH_PRIORITY, this field has no effect.The app auto update policy, which controls when automatic app updates can be applied.
      "applications": [ # Policy applied to apps. This can have at most 3,000 elements.
        { # Policy for an individual app. Note: Application availability on a given device cannot be changed using this policy if installAppsDisabled is enabled. The maximum number of applications that you can specify per policy is 3,000.
          "accessibleTrackIds": [ # 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.
            "A String",
          ],
          "alwaysOnVpnLockdownExemption": "A String", # Specifies whether the app is allowed networking when the VPN is not connected and alwaysOnVpnPackage.lockdownEnabled is enabled. If set to VPN_LOCKDOWN_ENFORCED, the app is not allowed networking, and if set to VPN_LOCKDOWN_EXEMPTION, the app is allowed networking. Only supported on devices running Android 10 and above. If this is not supported by the device, the device will contain a NonComplianceDetail with non_compliance_reason set to API_LEVEL and a fieldPath. If this is not applicable to the app, the device will contain a NonComplianceDetail with non_compliance_reason set to UNSUPPORTED and a fieldPath. The fieldPath is set to applications[i].alwaysOnVpnLockdownExemption, where i is the index of the package in the applications policy.
          "autoUpdateMode": "A String", # Controls the auto-update mode for the app.
          "connectedWorkAndPersonalApp": "A String", # Controls whether the app can communicate with itself across a device’s work and personal profiles, subject to user consent.
          "credentialProviderPolicy": "A String", # Optional. Whether the app is allowed to act as a credential provider on Android 14 and above.
          "defaultPermissionPolicy": "A String", # 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": [ # The scopes delegated to the app from Android Device Policy. These provide additional privileges for the applications they are applied to.
            "A String",
          ],
          "disabled": True or False, # Whether the app is disabled. When disabled, the app data is still preserved.
          "extensionConfig": { # Configuration to enable an app as an extension app, with the capability of interacting with Android Device Policy offline. For Android versions 13 and above, extension apps are exempt from battery restrictions so will not be placed into the restricted App Standby Bucket (https://developer.android.com/topic/performance/appstandby#restricted-bucket). Extensions apps are also protected against users clearing their data or force-closing the application, although admins can continue to use the clear app data command on extension apps if needed for Android 13 and above. # 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.
            "notificationReceiver": "A String", # Fully qualified class name of the receiver service class for Android Device Policy to notify the extension app of any local command status updates.
            "signingKeyFingerprintsSha256": [ # Hex-encoded SHA-256 hash of the signing certificate of the extension app. Only hexadecimal string representations of 64 characters are valid.If not specified, the signature for the corresponding package name is obtained from the Play Store instead.If this list is empty, the signature of the extension app on the device must match the signature obtained from the Play Store for the app to be able to communicate with Android Device Policy.If this list is not empty, the signature of the extension app on the device must match one of the entries in this list for the app to be able to communicate with Android Device Policy.In production use cases, it is recommended to leave this empty.
              "A String",
            ],
          },
          "installConstraint": [ # Optional. The constraints for installing the app. You can specify a maximum of one InstallConstraint. Multiple constraints are rejected.
            { # Amongst apps with InstallType set to: FORCE_INSTALLED PREINSTALLEDthis defines a set of restrictions for the app installation. At least one of the fields must be set. When multiple fields are set, then all the constraints need to be satisfied for the app to be installed.
              "chargingConstraint": "A String", # Optional. Charging constraint.
              "deviceIdleConstraint": "A String", # Optional. Device idle constraint.
              "networkTypeConstraint": "A String", # Optional. Network type constraint.
            },
          ],
          "installPriority": 42, # Optional. Amongst apps with installType set to: FORCE_INSTALLED PREINSTALLEDthis controls the relative priority of installation. A value of 0 (default) means this app has no priority over other apps. For values between 1 and 10,000, a lower value means a higher priority. Values outside of the range 0 to 10,000 inclusive are rejected.
          "installType": "A String", # The type of installation to perform.
          "lockTaskAllowed": True or False, # Whether the app is allowed to lock itself in full-screen mode. DEPRECATED. Use InstallType KIOSK or kioskCustomLauncherEnabled to configure a dedicated device.
          "managedConfiguration": { # 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
            "a_key": "", # Properties of the object.
          },
          "managedConfigurationTemplate": { # The managed configurations template for the app, saved from the managed configurations iframe. # The managed configurations template for the app, saved from the managed configurations iframe. This field is ignored if managed_configuration is set.
            "configurationVariables": { # Optional, a map containing configuration variables defined for the configuration.
              "a_key": "A String",
            },
            "templateId": "A String", # The ID of the managed configurations template.
          },
          "minimumVersionCode": 42, # 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": "A String", # The package name of the app. For example, com.google.android.youtube for the YouTube app.
          "permissionGrants": [ # Explicit permission grants or denials for the app. These values override the default_permission_policy and permission_grants which apply to all apps.
            { # Configuration for an Android permission and its grant state.
              "permission": "A String", # The Android permission or group, e.g. android.permission.READ_CALENDAR or android.permission_group.CALENDAR.
              "policy": "A String", # The policy for granting the permission.
            },
          ],
          "workProfileWidgets": "A String", # Specifies whether the app installed in the work profile is allowed to add widgets to the home screen.
        },
      ],
      "autoDateAndTimeZone": "A String", # Whether auto date, time, and time zone are enabled on a company-owned device. If this is set, then autoTimeRequired is ignored.
      "autoTimeRequired": True or False, # Whether auto time is required, which prevents the user from manually setting the date and time. If autoDateAndTimeZone is set, this field is ignored.
      "blockApplicationsEnabled": True or False, # Whether applications other than the ones configured in applications are blocked from being installed. When set, applications that were installed under a previous policy but no longer appear in the policy are automatically uninstalled.
      "bluetoothConfigDisabled": True or False, # Whether configuring bluetooth is disabled.
      "bluetoothContactSharingDisabled": True or False, # Whether bluetooth contact sharing is disabled.
      "bluetoothDisabled": True or False, # Whether bluetooth is disabled. Prefer this setting over bluetooth_config_disabled because bluetooth_config_disabled can be bypassed by the user.
      "cameraAccess": "A String", # Controls the use of the camera and whether the user has access to the camera access toggle.
      "cameraDisabled": True or False, # If camera_access is set to any value other than CAMERA_ACCESS_UNSPECIFIED, this has no effect. Otherwise this field controls whether cameras are disabled: If true, all cameras are disabled, otherwise they are available. For fully managed devices this field applies for all apps on the device. For work profiles, this field applies only to apps in the work profile, and the camera access of apps outside the work profile is unaffected.
      "cellBroadcastsConfigDisabled": True or False, # Whether configuring cell broadcast is disabled.
      "choosePrivateKeyRules": [ # Rules for determining apps' access to private keys. See ChoosePrivateKeyRule for details. This must be empty if any application has CERT_SELECTION delegation scope.
        { # Controls apps' access to private keys. The rule determines which private key, if any, Android Device Policy grants to the specified app. Access is granted either when the app calls KeyChain.choosePrivateKeyAlias (https://developer.android.com/reference/android/security/KeyChain#choosePrivateKeyAlias%28android.app.Activity,%20android.security.KeyChainAliasCallback,%20java.lang.String[],%20java.security.Principal[],%20java.lang.String,%20int,%20java.lang.String%29) (or any overloads) to request a private key alias for a given URL, or for rules that are not URL-specific (that is, if urlPattern is not set, or set to the empty string or .*) on Android 11 and above, directly so that the app can call KeyChain.getPrivateKey (https://developer.android.com/reference/android/security/KeyChain#getPrivateKey%28android.content.Context,%20java.lang.String%29), without first having to call KeyChain.choosePrivateKeyAlias.When an app calls KeyChain.choosePrivateKeyAlias if more than one choosePrivateKeyRules matches, the last matching rule defines which key alias to return.
          "packageNames": [ # The package names to which this rule applies. The hash of the signing certificate for each app is verified against the hash provided by Play. If no package names are specified, then the alias is provided to all apps that call KeyChain.choosePrivateKeyAlias (https://developer.android.com/reference/android/security/KeyChain#choosePrivateKeyAlias%28android.app.Activity,%20android.security.KeyChainAliasCallback,%20java.lang.String[],%20java.security.Principal[],%20java.lang.String,%20int,%20java.lang.String%29) or any overloads (but not without calling KeyChain.choosePrivateKeyAlias, even on Android 11 and above). Any app with the same Android UID as a package specified here will have access when they call KeyChain.choosePrivateKeyAlias.
            "A String",
          ],
          "privateKeyAlias": "A String", # The alias of the private key to be used.
          "urlPattern": "A String", # The URL pattern to match against the URL of the request. If not set or empty, it matches all URLs. This uses the regular expression syntax of java.util.regex.Pattern.
        },
      ],
      "complianceRules": [ # Rules declaring which mitigating actions to take when a device is not compliant with its policy. When the conditions for multiple rules are satisfied, all of the mitigating actions for the rules are taken. There is a maximum limit of 100 rules. Use policy enforcement rules instead.
        { # A rule declaring which mitigating actions to take when a device is not compliant with its policy. For every rule, there is always an implicit mitigating action to set policy_compliant to false for the Device resource, and display a message on the device indicating that the device is not compliant with its policy. Other mitigating actions may optionally be taken as well, depending on the field values in the rule.
          "apiLevelCondition": { # A compliance rule condition which is satisfied if the Android Framework API level on the device doesn't meet a minimum requirement. There can only be one rule with this type of condition per policy. # A condition which is satisfied if the Android Framework API level on the device doesn't meet a minimum requirement.
            "minApiLevel": 42, # The minimum desired Android Framework API level. If the device doesn't meet the minimum requirement, this condition is satisfied. Must be greater than zero.
          },
          "disableApps": True or False, # If set to true, the rule includes a mitigating action to disable apps so that the device is effectively disabled, but app data is preserved. If the device is running an app in locked task mode, the app will be closed and a UI showing the reason for non-compliance will be displayed.
          "nonComplianceDetailCondition": { # A compliance rule condition which is satisfied if there exists any matching NonComplianceDetail for the device. A NonComplianceDetail matches a NonComplianceDetailCondition if all the fields which are set within the NonComplianceDetailCondition match the corresponding NonComplianceDetail fields. # A condition which is satisfied if there exists any matching NonComplianceDetail for the device.
            "nonComplianceReason": "A String", # The reason the device is not in compliance with the setting. If not set, then this condition matches any reason.
            "packageName": "A String", # The package name of the app that's out of compliance. If not set, then this condition matches any package name.
            "settingName": "A String", # The name of the policy setting. This is the JSON field name of a top-level Policy field. If not set, then this condition matches any setting name.
          },
          "packageNamesToDisable": [ # If set, the rule includes a mitigating action to disable apps specified in the list, but app data is preserved.
            "A String",
          ],
        },
      ],
      "createWindowsDisabled": True or False, # Whether creating windows besides app windows is disabled.
      "credentialProviderPolicyDefault": "A String", # Controls which apps are allowed to act as credential providers on Android 14 and above. These apps store credentials, see this (https://developer.android.com/training/sign-in/passkeys) and this (https://developer.android.com/reference/androidx/credentials/CredentialManager) for details. See also credentialProviderPolicy.
      "credentialsConfigDisabled": True or False, # Whether configuring user credentials is disabled.
      "crossProfilePolicies": { # Controls the data from the work profile that can be accessed from the personal profile and vice versa. A nonComplianceDetail with MANAGEMENT_MODE is reported if the device does not have a work profile. # Cross-profile policies applied on the device.
        "crossProfileCopyPaste": "A String", # Whether text copied from one profile (personal or work) can be pasted in the other profile.
        "crossProfileDataSharing": "A String", # Whether data from one profile (personal or work) can be shared with apps in the other profile. Specifically controls simple data sharing via intents. Management of other cross-profile communication channels, such as contact search, copy/paste, or connected work & personal apps, are configured separately.
        "exemptionsToShowWorkContactsInPersonalProfile": { # A list of package names. # List of apps which are excluded from the ShowWorkContactsInPersonalProfile setting. For this to be set, ShowWorkContactsInPersonalProfile must be set to one of the following values: SHOW_WORK_CONTACTS_IN_PERSONAL_PROFILE_ALLOWED. In this case, these exemptions act as a blocklist. SHOW_WORK_CONTACTS_IN_PERSONAL_PROFILE_DISALLOWED. In this case, these exemptions act as an allowlist. SHOW_WORK_CONTACTS_IN_PERSONAL_PROFILE_DISALLOWED_EXCEPT_SYSTEM. In this case, these exemptions act as an allowlist, in addition to the already allowlisted system apps.Supported on Android 14 and above. A nonComplianceDetail with API_LEVEL is reported if the Android version is less than 14.
          "packageNames": [ # A list of package names.
            "A String",
          ],
        },
        "showWorkContactsInPersonalProfile": "A String", # Whether personal apps can access contacts stored in the work profile.See also exemptions_to_show_work_contacts_in_personal_profile.
        "workProfileWidgetsDefault": "A String", # Specifies the default behaviour for work profile widgets. If the policy does not specify work_profile_widgets for a specific application, it will behave according to the value specified here.
      },
      "dataRoamingDisabled": True or False, # Whether roaming data services are disabled.
      "debuggingFeaturesAllowed": True or False, # Whether the user is allowed to enable debugging features.
      "defaultPermissionPolicy": "A String", # The default permission policy for runtime permission requests.
      "deviceConnectivityManagement": { # Covers controls for device connectivity such as Wi-Fi, USB data access, keyboard/mouse connections, and more. # Covers controls for device connectivity such as Wi-Fi, USB data access, keyboard/mouse connections, and more.
        "configureWifi": "A String", # Controls Wi-Fi configuring privileges. Based on the option set, user will have either full or limited or no control in configuring Wi-Fi networks.
        "tetheringSettings": "A String", # Controls tethering settings. Based on the value set, the user is partially or fully disallowed from using different forms of tethering.
        "usbDataAccess": "A String", # Controls what files and/or data can be transferred via USB. Supported only on company-owned devices.
        "wifiDirectSettings": "A String", # Controls configuring and using Wi-Fi direct settings. Supported on company-owned devices running Android 13 and above.
        "wifiSsidPolicy": { # Restrictions on which Wi-Fi SSIDs the device can connect to. Note that this does not affect which networks can be configured on the device. Supported on company-owned devices running Android 13 and above. # Restrictions on which Wi-Fi SSIDs the device can connect to. Note that this does not affect which networks can be configured on the device. Supported on company-owned devices running Android 13 and above.
          "wifiSsidPolicyType": "A String", # Type of the Wi-Fi SSID policy to be applied.
          "wifiSsids": [ # Optional. List of Wi-Fi SSIDs that should be applied in the policy. This field must be non-empty when WifiSsidPolicyType is set to WIFI_SSID_ALLOWLIST. If this is set to a non-empty list, then a nonComplianceDetail detail with API_LEVEL is reported if the Android version is less than 13 and a nonComplianceDetail with MANAGEMENT_MODE is reported for non-company-owned devices.
            { # Represents a Wi-Fi SSID.
              "wifiSsid": "A String", # Required. Wi-Fi SSID represented as a string.
            },
          ],
        },
      },
      "deviceOwnerLockScreenInfo": { # Provides a user-facing message with locale info. The maximum message length is 4096 characters. # The device owner information to be shown on the lock screen.
        "defaultMessage": "A String", # The default message displayed if no localized message is specified or the user's locale doesn't match with any of the localized messages. A default message must be provided if any localized messages are provided.
        "localizedMessages": { # A map containing pairs, where locale is a well-formed BCP 47 language (https://www.w3.org/International/articles/language-tags/) code, such as en-US, es-ES, or fr.
          "a_key": "A String",
        },
      },
      "deviceRadioState": { # Controls for device radio settings. # Covers controls for radio state such as Wi-Fi, bluetooth, and more.
        "airplaneModeState": "A String", # Controls whether airplane mode can be toggled by the user or not.
        "cellularTwoGState": "A String", # Controls whether cellular 2G setting can be toggled by the user or not.
        "minimumWifiSecurityLevel": "A String", # The minimum required security level of Wi-Fi networks that the device can connect to.
        "ultraWidebandState": "A String", # Controls the state of the ultra wideband setting and whether the user can toggle it on or off.
        "wifiState": "A String", # Controls current state of Wi-Fi and if user can change its state.
      },
      "encryptionPolicy": "A String", # Whether encryption is enabled
      "ensureVerifyAppsEnabled": True or False, # Whether app verification is force-enabled.
      "factoryResetDisabled": True or False, # Whether factory resetting from settings is disabled.
      "frpAdminEmails": [ # Email addresses of device administrators for factory reset protection. When the device is factory reset, it will require one of these admins to log in with the Google account email and password to unlock the device. If no admins are specified, the device won't provide factory reset protection.
        "A String",
      ],
      "funDisabled": True or False, # Whether the user is allowed to have fun. Controls whether the Easter egg game in Settings is disabled.
      "installAppsDisabled": True or False, # Whether user installation of apps is disabled.
      "installUnknownSourcesAllowed": True or False, # This field has no effect.
      "keyguardDisabled": True or False, # If true, this disables the Lock Screen (https://source.android.com/docs/core/display/multi_display/lock-screen) for primary and/or secondary displays.
      "keyguardDisabledFeatures": [ # Disabled keyguard customizations, such as widgets.
        "A String",
      ],
      "kioskCustomLauncherEnabled": True or False, # Whether the kiosk custom launcher is enabled. This replaces the home screen with a launcher that locks down the device to the apps installed via the applications setting. Apps appear on a single page in alphabetical order. Use kioskCustomization to further configure the kiosk device behavior.
      "kioskCustomization": { # Settings controlling the behavior of a device in kiosk mode. To enable kiosk mode, set kioskCustomLauncherEnabled to true or specify an app in the policy with installType KIOSK. # Settings controlling the behavior of a device in kiosk mode. To enable kiosk mode, set kioskCustomLauncherEnabled to true or specify an app in the policy with installType KIOSK.
        "deviceSettings": "A String", # Specifies whether the Settings app is allowed in kiosk mode.
        "powerButtonActions": "A String", # Sets the behavior of a device in kiosk mode when a user presses and holds (long-presses) the Power button.
        "statusBar": "A String", # Specifies whether system info and notifications are disabled in kiosk mode.
        "systemErrorWarnings": "A String", # Specifies whether system error dialogs for crashed or unresponsive apps are blocked in kiosk mode. When blocked, the system will force-stop the app as if the user chooses the "close app" option on the UI.
        "systemNavigation": "A String", # Specifies which navigation features are enabled (e.g. Home, Overview buttons) in kiosk mode.
      },
      "locationMode": "A String", # The degree of location detection enabled.
      "longSupportMessage": { # Provides a user-facing message with locale info. The maximum message length is 4096 characters. # A message displayed to the user in the device administators settings screen.
        "defaultMessage": "A String", # The default message displayed if no localized message is specified or the user's locale doesn't match with any of the localized messages. A default message must be provided if any localized messages are provided.
        "localizedMessages": { # A map containing pairs, where locale is a well-formed BCP 47 language (https://www.w3.org/International/articles/language-tags/) code, such as en-US, es-ES, or fr.
          "a_key": "A String",
        },
      },
      "maximumTimeToLock": "A String", # Maximum time in milliseconds for user activity until the device locks. A value of 0 means there is no restriction.
      "microphoneAccess": "A String", # Controls the use of the microphone and whether the user has access to the microphone access toggle. This applies only on fully managed devices.
      "minimumApiLevel": 42, # The minimum allowed Android API level.
      "mobileNetworksConfigDisabled": True or False, # Whether configuring mobile networks is disabled.
      "modifyAccountsDisabled": True or False, # Whether adding or removing accounts is disabled.
      "mountPhysicalMediaDisabled": True or False, # Whether the user mounting physical external media is disabled.
      "name": "A String", # The name of the policy in the form enterprises/{enterpriseId}/policies/{policyId}.
      "networkEscapeHatchEnabled": True or False, # Whether the network escape hatch is enabled. If a network connection can't be made at boot time, the escape hatch prompts the user to temporarily connect to a network in order to refresh the device policy. After applying policy, the temporary network will be forgotten and the device will continue booting. This prevents being unable to connect to a network if there is no suitable network in the last policy and the device boots into an app in lock task mode, or the user is otherwise unable to reach device settings.Note: Setting wifiConfigDisabled to true will override this setting under specific circumstances. Please see wifiConfigDisabled for further details. Setting configureWifi to DISALLOW_CONFIGURING_WIFI will override this setting under specific circumstances. Please see DISALLOW_CONFIGURING_WIFI for further details.
      "networkResetDisabled": True or False, # Whether resetting network settings is disabled.
      "oncCertificateProviders": [ # This feature is not generally available.
        { # This feature is not generally available.
          "certificateReferences": [ # This feature is not generally available.
            "A String",
          ],
          "contentProviderEndpoint": { # This feature is not generally available. # This feature is not generally available.
            "packageName": "A String", # This feature is not generally available.
            "signingCertsSha256": [ # Required. This feature is not generally available.
              "A String",
            ],
            "uri": "A String", # This feature is not generally available.
          },
        },
      ],
      "openNetworkConfiguration": { # Network configuration for the device. See configure networks for more information.
        "a_key": "", # Properties of the object.
      },
      "outgoingBeamDisabled": True or False, # Whether using NFC to beam data from apps is disabled.
      "outgoingCallsDisabled": True or False, # Whether outgoing calls are disabled.
      "passwordPolicies": [ # Password requirement policies. Different policies can be set for work profile or fully managed devices by setting the password_scope field in the policy.
        { # Requirements for the password used to unlock a device.
          "maximumFailedPasswordsForWipe": 42, # Number of incorrect device-unlock passwords that can be entered before a device is wiped. A value of 0 means there is no restriction.
          "passwordExpirationTimeout": "A String", # Password expiration timeout.
          "passwordHistoryLength": 42, # The length of the password history. After setting this field, the user won't be able to enter a new password that is the same as any password in the history. A value of 0 means there is no restriction.
          "passwordMinimumLength": 42, # The minimum allowed password length. A value of 0 means there is no restriction. Only enforced when password_quality is NUMERIC, NUMERIC_COMPLEX, ALPHABETIC, ALPHANUMERIC, or COMPLEX.
          "passwordMinimumLetters": 42, # Minimum number of letters required in the password. Only enforced when password_quality is COMPLEX.
          "passwordMinimumLowerCase": 42, # Minimum number of lower case letters required in the password. Only enforced when password_quality is COMPLEX.
          "passwordMinimumNonLetter": 42, # Minimum number of non-letter characters (numerical digits or symbols) required in the password. Only enforced when password_quality is COMPLEX.
          "passwordMinimumNumeric": 42, # Minimum number of numerical digits required in the password. Only enforced when password_quality is COMPLEX.
          "passwordMinimumSymbols": 42, # Minimum number of symbols required in the password. Only enforced when password_quality is COMPLEX.
          "passwordMinimumUpperCase": 42, # Minimum number of upper case letters required in the password. Only enforced when password_quality is COMPLEX.
          "passwordQuality": "A String", # The required password quality.
          "passwordScope": "A String", # The scope that the password requirement applies to.
          "requirePasswordUnlock": "A String", # The length of time after a device or work profile is unlocked using a strong form of authentication (password, PIN, pattern) that it can be unlocked using any other authentication method (e.g. fingerprint, trust agents, face). After the specified time period elapses, only strong forms of authentication can be used to unlock the device or work profile.
          "unifiedLockSettings": "A String", # Controls whether a unified lock is allowed for the device and the work profile, on devices running Android 9 and above with a work profile. This can be set only if password_scope is set to SCOPE_PROFILE, the policy will be rejected otherwise. If user has not set a separate work lock and this field is set to REQUIRE_SEPARATE_WORK_LOCK, a NonComplianceDetail is reported with nonComplianceReason set to USER_ACTION.
        },
      ],
      "passwordRequirements": { # Requirements for the password used to unlock a device. # Password requirements. The field password_requirements.require_password_unlock must not be set. DEPRECATED - Use passwordPolicies.Note:Complexity-based values of PasswordQuality, that is, COMPLEXITY_LOW, COMPLEXITY_MEDIUM, and COMPLEXITY_HIGH, cannot be used here. unified_lock_settings cannot be used here.
        "maximumFailedPasswordsForWipe": 42, # Number of incorrect device-unlock passwords that can be entered before a device is wiped. A value of 0 means there is no restriction.
        "passwordExpirationTimeout": "A String", # Password expiration timeout.
        "passwordHistoryLength": 42, # The length of the password history. After setting this field, the user won't be able to enter a new password that is the same as any password in the history. A value of 0 means there is no restriction.
        "passwordMinimumLength": 42, # The minimum allowed password length. A value of 0 means there is no restriction. Only enforced when password_quality is NUMERIC, NUMERIC_COMPLEX, ALPHABETIC, ALPHANUMERIC, or COMPLEX.
        "passwordMinimumLetters": 42, # Minimum number of letters required in the password. Only enforced when password_quality is COMPLEX.
        "passwordMinimumLowerCase": 42, # Minimum number of lower case letters required in the password. Only enforced when password_quality is COMPLEX.
        "passwordMinimumNonLetter": 42, # Minimum number of non-letter characters (numerical digits or symbols) required in the password. Only enforced when password_quality is COMPLEX.
        "passwordMinimumNumeric": 42, # Minimum number of numerical digits required in the password. Only enforced when password_quality is COMPLEX.
        "passwordMinimumSymbols": 42, # Minimum number of symbols required in the password. Only enforced when password_quality is COMPLEX.
        "passwordMinimumUpperCase": 42, # Minimum number of upper case letters required in the password. Only enforced when password_quality is COMPLEX.
        "passwordQuality": "A String", # The required password quality.
        "passwordScope": "A String", # The scope that the password requirement applies to.
        "requirePasswordUnlock": "A String", # The length of time after a device or work profile is unlocked using a strong form of authentication (password, PIN, pattern) that it can be unlocked using any other authentication method (e.g. fingerprint, trust agents, face). After the specified time period elapses, only strong forms of authentication can be used to unlock the device or work profile.
        "unifiedLockSettings": "A String", # Controls whether a unified lock is allowed for the device and the work profile, on devices running Android 9 and above with a work profile. This can be set only if password_scope is set to SCOPE_PROFILE, the policy will be rejected otherwise. If user has not set a separate work lock and this field is set to REQUIRE_SEPARATE_WORK_LOCK, a NonComplianceDetail is reported with nonComplianceReason set to USER_ACTION.
      },
      "permissionGrants": [ # Explicit permission or group grants or denials for all apps. These values override the default_permission_policy.
        { # Configuration for an Android permission and its grant state.
          "permission": "A String", # The Android permission or group, e.g. android.permission.READ_CALENDAR or android.permission_group.CALENDAR.
          "policy": "A String", # The policy for granting the permission.
        },
      ],
      "permittedAccessibilityServices": { # A list of package names. # Specifies permitted accessibility services. If the field is not set, any accessibility service can be used. If the field is set, only the accessibility services in this list and the system's built-in accessibility service can be used. In particular, if the field is set to empty, only the system's built-in accessibility servicess can be used. This can be set on fully managed devices and on work profiles. When applied to a work profile, this affects both the personal profile and the work profile.
        "packageNames": [ # A list of package names.
          "A String",
        ],
      },
      "permittedInputMethods": { # A list of package names. # If present, only the input methods provided by packages in this list are permitted. If this field is present, but the list is empty, then only system input methods are permitted.
        "packageNames": [ # A list of package names.
          "A String",
        ],
      },
      "persistentPreferredActivities": [ # Default intent handler activities.
        { # A default activity for handling intents that match a particular intent filter. Note: To set up a kiosk, use InstallType to KIOSK rather than use persistent preferred activities.
          "actions": [ # The intent actions to match in the filter. If any actions are included in the filter, then an intent's action must be one of those values for it to match. If no actions are included, the intent action is ignored.
            "A String",
          ],
          "categories": [ # The intent categories to match in the filter. An intent includes the categories that it requires, all of which must be included in the filter in order to match. In other words, adding a category to the filter has no impact on matching unless that category is specified in the intent.
            "A String",
          ],
          "receiverActivity": "A String", # The activity that should be the default intent handler. This should be an Android component name, e.g. com.android.enterprise.app/.MainActivity. Alternatively, the value may be the package name of an app, which causes Android Device Policy to choose an appropriate activity from the app to handle the intent.
        },
      ],
      "personalUsagePolicies": { # Policies controlling personal usage on a company-owned device with a work profile. # Policies managing personal usage on a company-owned device.
        "accountTypesWithManagementDisabled": [ # Account types that can't be managed by the user.
          "A String",
        ],
        "cameraDisabled": True or False, # If true, the camera is disabled on the personal profile.
        "maxDaysWithWorkOff": 42, # Controls how long the work profile can stay off. The minimum duration must be at least 3 days. Other details are as follows: - If the duration is set to 0, the feature is turned off. - If the duration is set to a value smaller than the minimum duration, the feature returns an error. *Note:* If you want to avoid personal profiles being suspended during long periods of off-time, you can temporarily set a large value for this parameter.
        "personalApplications": [ # Policy applied to applications in the personal profile.
          { # Policies for apps in the personal profile of a company-owned device with a work profile.
            "installType": "A String", # The type of installation to perform.
            "packageName": "A String", # The package name of the application.
          },
        ],
        "personalPlayStoreMode": "A String", # Used together with personalApplications to control how apps in the personal profile are allowed or blocked.
        "screenCaptureDisabled": True or False, # If true, screen capture is disabled for all users.
      },
      "playStoreMode": "A String", # This mode controls which apps are available to the user in the Play Store and the behavior on the device when apps are removed from the policy.
      "policyEnforcementRules": [ # Rules that define the behavior when a particular policy can not be applied on device
        { # A rule that defines the actions to take if a device or work profile is not compliant with the policy specified in settingName. In the case of multiple matching or multiple triggered enforcement rules, a merge will occur with the most severe action being taken. However, all triggered rules are still kept track of: this includes initial trigger time and all associated non-compliance details. In the situation where the most severe enforcement rule is satisfied, the next most appropriate action is applied.
          "blockAction": { # An action to block access to apps and data on a fully managed device or in a work profile. This action also triggers a device or work profile to displays a user-facing notification with information (where possible) on how to correct the compliance issue. Note: wipeAction must also be specified. # An action to block access to apps and data on a company owned device or in a work profile. This action also triggers a user-facing notification with information (where possible) on how to correct the compliance issue. Note: wipeAction must also be specified.
            "blockAfterDays": 42, # Number of days the policy is non-compliant before the device or work profile is blocked. To block access immediately, set to 0. blockAfterDays must be less than wipeAfterDays.
            "blockScope": "A String", # Specifies the scope of this BlockAction. Only applicable to devices that are company-owned.
          },
          "settingName": "A String", # The top-level policy to enforce. For example, applications or passwordPolicies.
          "wipeAction": { # An action to reset a company owned device or delete a work profile. Note: blockAction must also be specified. # An action to reset a company owned device or delete a work profile. Note: blockAction must also be specified.
            "preserveFrp": True or False, # Whether the factory-reset protection data is preserved on the device. This setting doesn’t apply to work profiles.
            "wipeAfterDays": 42, # Number of days the policy is non-compliant before the device or work profile is wiped. wipeAfterDays must be greater than blockAfterDays.
          },
        },
      ],
      "preferentialNetworkService": "A String", # Controls whether preferential network service is enabled on the work profile. For example, an organization may have an agreement with a carrier that all of the work data from its employees' devices will be sent via a network service dedicated for enterprise use. An example of a supported preferential network service is the enterprise slice on 5G networks. This has no effect on fully managed devices.
      "printingPolicy": "A String", # Optional. Controls whether printing is allowed. This is supported on devices running Android 9 and above. .
      "privateKeySelectionEnabled": True or False, # Allows showing UI on a device for a user to choose a private key alias if there are no matching rules in ChoosePrivateKeyRules. For devices below Android P, setting this may leave enterprise keys vulnerable. This value will have no effect if any application has CERT_SELECTION delegation scope.
      "recommendedGlobalProxy": { # Configuration info for an HTTP proxy. For a direct proxy, set the host, port, and excluded_hosts fields. For a PAC script proxy, set the pac_uri field. # The network-independent global HTTP proxy. Typically proxies should be configured per-network in open_network_configuration. However for unusual configurations like general internal filtering a global HTTP proxy may be useful. If the proxy is not accessible, network access may break. The global proxy is only a recommendation and some apps may ignore it.
        "excludedHosts": [ # For a direct proxy, the hosts for which the proxy is bypassed. The host names may contain wildcards such as *.example.com.
          "A String",
        ],
        "host": "A String", # The host of the direct proxy.
        "pacUri": "A String", # The URI of the PAC script used to configure the proxy.
        "port": 42, # The port of the direct proxy.
      },
      "removeUserDisabled": True or False, # Whether removing other users is disabled.
      "safeBootDisabled": True or False, # Whether rebooting the device into safe boot is disabled.
      "screenCaptureDisabled": True or False, # Whether screen capture is disabled.
      "setUserIconDisabled": True or False, # Whether changing the user icon is disabled.
      "setWallpaperDisabled": True or False, # Whether changing the wallpaper is disabled.
      "setupActions": [ # Action to take during the setup process. At most one action may be specified.
        { # An action executed during setup.
          "description": { # Provides a user-facing message with locale info. The maximum message length is 4096 characters. # Description of this action.
            "defaultMessage": "A String", # The default message displayed if no localized message is specified or the user's locale doesn't match with any of the localized messages. A default message must be provided if any localized messages are provided.
            "localizedMessages": { # A map containing pairs, where locale is a well-formed BCP 47 language (https://www.w3.org/International/articles/language-tags/) code, such as en-US, es-ES, or fr.
              "a_key": "A String",
            },
          },
          "launchApp": { # An action to launch an app. # An action to launch an app. The app will be launched with an intent containing an extra with key com.google.android.apps.work.clouddpc.EXTRA_LAUNCHED_AS_SETUP_ACTION set to the boolean value true to indicate that this is a setup action flow. If SetupAction references an app, the corresponding installType in the application policy must be set as REQUIRED_FOR_SETUP or said setup will fail.
            "packageName": "A String", # Package name of app to be launched
          },
          "title": { # Provides a user-facing message with locale info. The maximum message length is 4096 characters. # Title of this action.
            "defaultMessage": "A String", # The default message displayed if no localized message is specified or the user's locale doesn't match with any of the localized messages. A default message must be provided if any localized messages are provided.
            "localizedMessages": { # A map containing pairs, where locale is a well-formed BCP 47 language (https://www.w3.org/International/articles/language-tags/) code, such as en-US, es-ES, or fr.
              "a_key": "A String",
            },
          },
        },
      ],
      "shareLocationDisabled": True or False, # Whether location sharing is disabled. share_location_disabled is supported for both fully managed devices and personally owned work profiles.
      "shortSupportMessage": { # Provides a user-facing message with locale info. The maximum message length is 4096 characters. # A message displayed to the user in the settings screen wherever functionality has been disabled by the admin. If the message is longer than 200 characters it may be truncated.
        "defaultMessage": "A String", # The default message displayed if no localized message is specified or the user's locale doesn't match with any of the localized messages. A default message must be provided if any localized messages are provided.
        "localizedMessages": { # A map containing pairs, where locale is a well-formed BCP 47 language (https://www.w3.org/International/articles/language-tags/) code, such as en-US, es-ES, or fr.
          "a_key": "A String",
        },
      },
      "skipFirstUseHintsEnabled": True or False, # Flag to skip hints on the first use. Enterprise admin can enable the system recommendation for apps to skip their user tutorial and other introductory hints on first start-up.
      "smsDisabled": True or False, # Whether sending and receiving SMS messages is disabled.
      "statusBarDisabled": True or False, # Whether the status bar is disabled. This disables notifications, quick settings, and other screen overlays that allow escape from full-screen mode. DEPRECATED. To disable the status bar on a kiosk device, use InstallType KIOSK or kioskCustomLauncherEnabled.
      "statusReportingSettings": { # Settings controlling the behavior of status reports. # Status reporting settings
        "applicationReportingSettings": { # Settings controlling the behavior of application reports. # Application reporting settings. Only applicable if application_reports_enabled is true.
          "includeRemovedApps": True or False, # Whether removed apps are included in application reports.
        },
        "applicationReportsEnabled": True or False, # Whether app reports are enabled.
        "commonCriteriaModeEnabled": True or False, # Whether Common Criteria Mode reporting is enabled.
        "deviceSettingsEnabled": True or False, # Whether device settings reporting is enabled.
        "displayInfoEnabled": True or False, # Whether displays reporting is enabled. Report data is not available for personally owned devices with work profiles.
        "hardwareStatusEnabled": True or False, # Whether hardware status reporting is enabled. Report data is not available for personally owned devices with work profiles.
        "memoryInfoEnabled": True or False, # Whether memory event reporting is enabled.
        "networkInfoEnabled": True or False, # Whether network info reporting is enabled.
        "powerManagementEventsEnabled": True or False, # Whether power management event reporting is enabled. Report data is not available for personally owned devices with work profiles.
        "softwareInfoEnabled": True or False, # Whether software info reporting is enabled.
        "systemPropertiesEnabled": True or False, # Whether system properties reporting is enabled.
      },
      "stayOnPluggedModes": [ # The battery plugged in modes for which the device stays on. When using this setting, it is recommended to clear maximum_time_to_lock so that the device doesn't lock itself while it stays on.
        "A String",
      ],
      "systemUpdate": { # Configuration for managing system updatesNote: Google Play system updates (https://source.android.com/docs/core/ota/modular-system) (also called Mainline updates) are automatically downloaded but require a device reboot to be installed. Refer to the mainline section in Manage system updates (https://developer.android.com/work/dpc/system-updates#mainline) for further details. # The system update policy, which controls how OS updates are applied. If the update type is WINDOWED, the update window will automatically apply to Play app updates as well.Note: Google Play system updates (https://source.android.com/docs/core/ota/modular-system) (also called Mainline updates) are automatically downloaded and require a device reboot to be installed. Refer to the mainline section in Manage system updates (https://developer.android.com/work/dpc/system-updates#mainline) for further details.
        "endMinutes": 42, # If the type is WINDOWED, the end of the maintenance window, measured as the number of minutes after midnight in device's local time. This value must be between 0 and 1439, inclusive. If this value is less than start_minutes, then the maintenance window spans midnight. If the maintenance window specified is smaller than 30 minutes, the actual window is extended to 30 minutes beyond the start time.
        "freezePeriods": [ # An annually repeating time period in which over-the-air (OTA) system updates are postponed to freeze the OS version running on a device. To prevent freezing the device indefinitely, each freeze period must be separated by at least 60 days.
          { # A system freeze period. When a device’s clock is within the freeze period, all incoming system updates (including security patches) are blocked and won’t be installed.When the device is outside any set freeze periods, the normal policy behavior (automatic, windowed, or postponed) applies.Leap years are ignored in freeze period calculations, in particular: If Feb. 29th is set as the start or end date of a freeze period, the freeze period will start or end on Feb. 28th instead. When a device’s system clock reads Feb. 29th, it’s treated as Feb. 28th. When calculating the number of days in a freeze period or the time between two freeze periods, Feb. 29th is ignored and not counted as a day.Note: For Freeze Periods to take effect, SystemUpdateType cannot be specified as SYSTEM_UPDATE_TYPE_UNSPECIFIED, because freeze periods require a defined policy to be specified.
            "endDate": { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: A full date, with non-zero year, month, and day values. A month and day, with a zero year (for example, an anniversary). A year on its own, with a zero month and a zero day. A year and month, with a zero day (for example, a credit card expiration date).Related types: google.type.TimeOfDay google.type.DateTime google.protobuf.Timestamp # The end date (inclusive) of the freeze period. Must be no later than 90 days from the start date. If the end date is earlier than the start date, the freeze period is considered wrapping year-end. Note: year must not be set. For example, {"month": 1,"date": 30}.
              "day": 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.
              "month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
              "year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
            },
            "startDate": { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: A full date, with non-zero year, month, and day values. A month and day, with a zero year (for example, an anniversary). A year on its own, with a zero month and a zero day. A year and month, with a zero day (for example, a credit card expiration date).Related types: google.type.TimeOfDay google.type.DateTime google.protobuf.Timestamp # The start date (inclusive) of the freeze period. Note: year must not be set. For example, {"month": 1,"date": 30}.
              "day": 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.
              "month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
              "year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
            },
          },
        ],
        "startMinutes": 42, # If the type is WINDOWED, the start of the maintenance window, measured as the number of minutes after midnight in the device's local time. This value must be between 0 and 1439, inclusive.
        "type": "A String", # The type of system update to configure.
      },
      "tetheringConfigDisabled": True or False, # Whether configuring tethering and portable hotspots is disabled. If tetheringSettings is set to anything other than TETHERING_SETTINGS_UNSPECIFIED, this setting is ignored.
      "uninstallAppsDisabled": True or False, # Whether user uninstallation of applications is disabled. This prevents apps from being uninstalled, even those removed using applications
      "unmuteMicrophoneDisabled": True or False, # If microphone_access is set to any value other than MICROPHONE_ACCESS_UNSPECIFIED, this has no effect. Otherwise this field controls whether microphones are disabled: If true, all microphones are disabled, otherwise they are available. This is available only on fully managed devices.
      "usageLog": { # Controls types of device activity logs collected from the device and reported via Pub/Sub notification (https://developers.google.com/android/management/notifications). # Configuration of device activity logging.
        "enabledLogTypes": [ # Specifies which log types are enabled. Note that users will receive on-device messaging when usage logging is enabled.
          "A String",
        ],
        "uploadOnCellularAllowed": [ # Specifies which of the enabled log types can be uploaded over mobile data. By default logs are queued for upload when the device connects to WiFi.
          "A String",
        ],
      },
      "usbFileTransferDisabled": True or False, # Whether transferring files over USB is disabled. This is supported only on company-owned devices.
      "usbMassStorageEnabled": True or False, # Whether USB storage is enabled. Deprecated.
      "version": "A String", # The version of the policy. This is a read-only field. The version is incremented each time the policy is updated.
      "vpnConfigDisabled": True or False, # Whether configuring VPN is disabled.
      "wifiConfigDisabled": True or False, # Whether configuring Wi-Fi networks is disabled. Supported on fully managed devices and work profiles on company-owned devices. For fully managed devices, setting this to true removes all configured networks and retains only the networks configured using openNetworkConfiguration. For work profiles on company-owned devices, existing configured networks are not affected and the user is not allowed to add, remove, or modify Wi-Fi networks. If configureWifi is set to anything other than CONFIGURE_WIFI_UNSPECIFIED, this setting is ignored. Note: If a network connection can't be made at boot time and configuring Wi-Fi is disabled then network escape hatch will be shown in order to refresh the device policy (see networkEscapeHatchEnabled).
      "wifiConfigsLockdownEnabled": True or False, # DEPRECATED - Use wifi_config_disabled.
    },
  ],
}
list_next()
Retrieves the next page of results.

        Args:
          previous_request: The request for the previous page. (required)
          previous_response: The response from the request for the previous page. (required)

        Returns:
          A request object that you can call 'execute()' on to request the next
          page. Returns None if there are no more items in the collection.
        
patch(name, body=None, updateMask=None, x__xgafv=None)
Updates or creates a policy.

Args:
  name: string, The name of the policy in the form enterprises/{enterpriseId}/policies/{policyId}. (required)
  body: object, The request body.
    The object takes the form of:

{ # A policy resource represents a group of settings that govern the behavior of a managed device and the apps installed on it.
  "accountTypesWithManagementDisabled": [ # Account types that can't be managed by the user.
    "A String",
  ],
  "addUserDisabled": True or False, # Whether adding new users and profiles is disabled.
  "adjustVolumeDisabled": True or False, # Whether adjusting the master volume is disabled. Also mutes the device.
  "advancedSecurityOverrides": { # Advanced security settings. In most cases, setting these is not needed. # Advanced security settings. In most cases, setting these is not needed.
    "commonCriteriaMode": "A String", # Controls Common Criteria Mode—security standards defined in the Common Criteria for Information Technology Security Evaluation (https://www.commoncriteriaportal.org/) (CC). Enabling Common Criteria Mode increases certain security components on a device, including AES-GCM encryption of Bluetooth Long Term Keys, and Wi-Fi configuration stores.Warning: Common Criteria Mode enforces a strict security model typically only required for IT products used in national security systems and other highly sensitive organizations. Standard device use may be affected. Only enabled if required.
    "developerSettings": "A String", # Controls access to developer settings: developer options and safe boot. Replaces safeBootDisabled (deprecated) and debuggingFeaturesAllowed (deprecated).
    "googlePlayProtectVerifyApps": "A String", # Whether Google Play Protect verification (https://support.google.com/accounts/answer/2812853) is enforced. Replaces ensureVerifyAppsEnabled (deprecated).
    "mtePolicy": "A String", # Optional. Controls Memory Tagging Extension (MTE) (https://source.android.com/docs/security/test/memory-safety/arm-mte) on the device. The device needs to be rebooted to apply changes to the MTE policy.
    "personalAppsThatCanReadWorkNotifications": [ # Personal apps that can read work profile notifications using a NotificationListenerService (https://developer.android.com/reference/android/service/notification/NotificationListenerService). By default, no personal apps (aside from system apps) can read work notifications. Each value in the list must be a package name.
      "A String",
    ],
    "untrustedAppsPolicy": "A String", # The policy for untrusted apps (apps from unknown sources) enforced on the device. Replaces install_unknown_sources_allowed (deprecated).
  },
  "alwaysOnVpnPackage": { # Configuration for an always-on VPN connection. # Configuration for an always-on VPN connection. Use with vpn_config_disabled to prevent modification of this setting.
    "lockdownEnabled": True or False, # Disallows networking when the VPN is not connected.
    "packageName": "A String", # The package name of the VPN app.
  },
  "androidDevicePolicyTracks": [ # This setting is not supported. Any value is ignored.
    "A String",
  ],
  "appAutoUpdatePolicy": "A String", # Recommended alternative: autoUpdateMode which is set per app, provides greater flexibility around update frequency.When autoUpdateMode is set to AUTO_UPDATE_POSTPONED or AUTO_UPDATE_HIGH_PRIORITY, this field has no effect.The app auto update policy, which controls when automatic app updates can be applied.
  "applications": [ # Policy applied to apps. This can have at most 3,000 elements.
    { # Policy for an individual app. Note: Application availability on a given device cannot be changed using this policy if installAppsDisabled is enabled. The maximum number of applications that you can specify per policy is 3,000.
      "accessibleTrackIds": [ # 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.
        "A String",
      ],
      "alwaysOnVpnLockdownExemption": "A String", # Specifies whether the app is allowed networking when the VPN is not connected and alwaysOnVpnPackage.lockdownEnabled is enabled. If set to VPN_LOCKDOWN_ENFORCED, the app is not allowed networking, and if set to VPN_LOCKDOWN_EXEMPTION, the app is allowed networking. Only supported on devices running Android 10 and above. If this is not supported by the device, the device will contain a NonComplianceDetail with non_compliance_reason set to API_LEVEL and a fieldPath. If this is not applicable to the app, the device will contain a NonComplianceDetail with non_compliance_reason set to UNSUPPORTED and a fieldPath. The fieldPath is set to applications[i].alwaysOnVpnLockdownExemption, where i is the index of the package in the applications policy.
      "autoUpdateMode": "A String", # Controls the auto-update mode for the app.
      "connectedWorkAndPersonalApp": "A String", # Controls whether the app can communicate with itself across a device’s work and personal profiles, subject to user consent.
      "credentialProviderPolicy": "A String", # Optional. Whether the app is allowed to act as a credential provider on Android 14 and above.
      "defaultPermissionPolicy": "A String", # 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": [ # The scopes delegated to the app from Android Device Policy. These provide additional privileges for the applications they are applied to.
        "A String",
      ],
      "disabled": True or False, # Whether the app is disabled. When disabled, the app data is still preserved.
      "extensionConfig": { # Configuration to enable an app as an extension app, with the capability of interacting with Android Device Policy offline. For Android versions 13 and above, extension apps are exempt from battery restrictions so will not be placed into the restricted App Standby Bucket (https://developer.android.com/topic/performance/appstandby#restricted-bucket). Extensions apps are also protected against users clearing their data or force-closing the application, although admins can continue to use the clear app data command on extension apps if needed for Android 13 and above. # 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.
        "notificationReceiver": "A String", # Fully qualified class name of the receiver service class for Android Device Policy to notify the extension app of any local command status updates.
        "signingKeyFingerprintsSha256": [ # Hex-encoded SHA-256 hash of the signing certificate of the extension app. Only hexadecimal string representations of 64 characters are valid.If not specified, the signature for the corresponding package name is obtained from the Play Store instead.If this list is empty, the signature of the extension app on the device must match the signature obtained from the Play Store for the app to be able to communicate with Android Device Policy.If this list is not empty, the signature of the extension app on the device must match one of the entries in this list for the app to be able to communicate with Android Device Policy.In production use cases, it is recommended to leave this empty.
          "A String",
        ],
      },
      "installConstraint": [ # Optional. The constraints for installing the app. You can specify a maximum of one InstallConstraint. Multiple constraints are rejected.
        { # Amongst apps with InstallType set to: FORCE_INSTALLED PREINSTALLEDthis defines a set of restrictions for the app installation. At least one of the fields must be set. When multiple fields are set, then all the constraints need to be satisfied for the app to be installed.
          "chargingConstraint": "A String", # Optional. Charging constraint.
          "deviceIdleConstraint": "A String", # Optional. Device idle constraint.
          "networkTypeConstraint": "A String", # Optional. Network type constraint.
        },
      ],
      "installPriority": 42, # Optional. Amongst apps with installType set to: FORCE_INSTALLED PREINSTALLEDthis controls the relative priority of installation. A value of 0 (default) means this app has no priority over other apps. For values between 1 and 10,000, a lower value means a higher priority. Values outside of the range 0 to 10,000 inclusive are rejected.
      "installType": "A String", # The type of installation to perform.
      "lockTaskAllowed": True or False, # Whether the app is allowed to lock itself in full-screen mode. DEPRECATED. Use InstallType KIOSK or kioskCustomLauncherEnabled to configure a dedicated device.
      "managedConfiguration": { # 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
        "a_key": "", # Properties of the object.
      },
      "managedConfigurationTemplate": { # The managed configurations template for the app, saved from the managed configurations iframe. # The managed configurations template for the app, saved from the managed configurations iframe. This field is ignored if managed_configuration is set.
        "configurationVariables": { # Optional, a map containing configuration variables defined for the configuration.
          "a_key": "A String",
        },
        "templateId": "A String", # The ID of the managed configurations template.
      },
      "minimumVersionCode": 42, # 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": "A String", # The package name of the app. For example, com.google.android.youtube for the YouTube app.
      "permissionGrants": [ # Explicit permission grants or denials for the app. These values override the default_permission_policy and permission_grants which apply to all apps.
        { # Configuration for an Android permission and its grant state.
          "permission": "A String", # The Android permission or group, e.g. android.permission.READ_CALENDAR or android.permission_group.CALENDAR.
          "policy": "A String", # The policy for granting the permission.
        },
      ],
      "workProfileWidgets": "A String", # Specifies whether the app installed in the work profile is allowed to add widgets to the home screen.
    },
  ],
  "autoDateAndTimeZone": "A String", # Whether auto date, time, and time zone are enabled on a company-owned device. If this is set, then autoTimeRequired is ignored.
  "autoTimeRequired": True or False, # Whether auto time is required, which prevents the user from manually setting the date and time. If autoDateAndTimeZone is set, this field is ignored.
  "blockApplicationsEnabled": True or False, # Whether applications other than the ones configured in applications are blocked from being installed. When set, applications that were installed under a previous policy but no longer appear in the policy are automatically uninstalled.
  "bluetoothConfigDisabled": True or False, # Whether configuring bluetooth is disabled.
  "bluetoothContactSharingDisabled": True or False, # Whether bluetooth contact sharing is disabled.
  "bluetoothDisabled": True or False, # Whether bluetooth is disabled. Prefer this setting over bluetooth_config_disabled because bluetooth_config_disabled can be bypassed by the user.
  "cameraAccess": "A String", # Controls the use of the camera and whether the user has access to the camera access toggle.
  "cameraDisabled": True or False, # If camera_access is set to any value other than CAMERA_ACCESS_UNSPECIFIED, this has no effect. Otherwise this field controls whether cameras are disabled: If true, all cameras are disabled, otherwise they are available. For fully managed devices this field applies for all apps on the device. For work profiles, this field applies only to apps in the work profile, and the camera access of apps outside the work profile is unaffected.
  "cellBroadcastsConfigDisabled": True or False, # Whether configuring cell broadcast is disabled.
  "choosePrivateKeyRules": [ # Rules for determining apps' access to private keys. See ChoosePrivateKeyRule for details. This must be empty if any application has CERT_SELECTION delegation scope.
    { # Controls apps' access to private keys. The rule determines which private key, if any, Android Device Policy grants to the specified app. Access is granted either when the app calls KeyChain.choosePrivateKeyAlias (https://developer.android.com/reference/android/security/KeyChain#choosePrivateKeyAlias%28android.app.Activity,%20android.security.KeyChainAliasCallback,%20java.lang.String[],%20java.security.Principal[],%20java.lang.String,%20int,%20java.lang.String%29) (or any overloads) to request a private key alias for a given URL, or for rules that are not URL-specific (that is, if urlPattern is not set, or set to the empty string or .*) on Android 11 and above, directly so that the app can call KeyChain.getPrivateKey (https://developer.android.com/reference/android/security/KeyChain#getPrivateKey%28android.content.Context,%20java.lang.String%29), without first having to call KeyChain.choosePrivateKeyAlias.When an app calls KeyChain.choosePrivateKeyAlias if more than one choosePrivateKeyRules matches, the last matching rule defines which key alias to return.
      "packageNames": [ # The package names to which this rule applies. The hash of the signing certificate for each app is verified against the hash provided by Play. If no package names are specified, then the alias is provided to all apps that call KeyChain.choosePrivateKeyAlias (https://developer.android.com/reference/android/security/KeyChain#choosePrivateKeyAlias%28android.app.Activity,%20android.security.KeyChainAliasCallback,%20java.lang.String[],%20java.security.Principal[],%20java.lang.String,%20int,%20java.lang.String%29) or any overloads (but not without calling KeyChain.choosePrivateKeyAlias, even on Android 11 and above). Any app with the same Android UID as a package specified here will have access when they call KeyChain.choosePrivateKeyAlias.
        "A String",
      ],
      "privateKeyAlias": "A String", # The alias of the private key to be used.
      "urlPattern": "A String", # The URL pattern to match against the URL of the request. If not set or empty, it matches all URLs. This uses the regular expression syntax of java.util.regex.Pattern.
    },
  ],
  "complianceRules": [ # Rules declaring which mitigating actions to take when a device is not compliant with its policy. When the conditions for multiple rules are satisfied, all of the mitigating actions for the rules are taken. There is a maximum limit of 100 rules. Use policy enforcement rules instead.
    { # A rule declaring which mitigating actions to take when a device is not compliant with its policy. For every rule, there is always an implicit mitigating action to set policy_compliant to false for the Device resource, and display a message on the device indicating that the device is not compliant with its policy. Other mitigating actions may optionally be taken as well, depending on the field values in the rule.
      "apiLevelCondition": { # A compliance rule condition which is satisfied if the Android Framework API level on the device doesn't meet a minimum requirement. There can only be one rule with this type of condition per policy. # A condition which is satisfied if the Android Framework API level on the device doesn't meet a minimum requirement.
        "minApiLevel": 42, # The minimum desired Android Framework API level. If the device doesn't meet the minimum requirement, this condition is satisfied. Must be greater than zero.
      },
      "disableApps": True or False, # If set to true, the rule includes a mitigating action to disable apps so that the device is effectively disabled, but app data is preserved. If the device is running an app in locked task mode, the app will be closed and a UI showing the reason for non-compliance will be displayed.
      "nonComplianceDetailCondition": { # A compliance rule condition which is satisfied if there exists any matching NonComplianceDetail for the device. A NonComplianceDetail matches a NonComplianceDetailCondition if all the fields which are set within the NonComplianceDetailCondition match the corresponding NonComplianceDetail fields. # A condition which is satisfied if there exists any matching NonComplianceDetail for the device.
        "nonComplianceReason": "A String", # The reason the device is not in compliance with the setting. If not set, then this condition matches any reason.
        "packageName": "A String", # The package name of the app that's out of compliance. If not set, then this condition matches any package name.
        "settingName": "A String", # The name of the policy setting. This is the JSON field name of a top-level Policy field. If not set, then this condition matches any setting name.
      },
      "packageNamesToDisable": [ # If set, the rule includes a mitigating action to disable apps specified in the list, but app data is preserved.
        "A String",
      ],
    },
  ],
  "createWindowsDisabled": True or False, # Whether creating windows besides app windows is disabled.
  "credentialProviderPolicyDefault": "A String", # Controls which apps are allowed to act as credential providers on Android 14 and above. These apps store credentials, see this (https://developer.android.com/training/sign-in/passkeys) and this (https://developer.android.com/reference/androidx/credentials/CredentialManager) for details. See also credentialProviderPolicy.
  "credentialsConfigDisabled": True or False, # Whether configuring user credentials is disabled.
  "crossProfilePolicies": { # Controls the data from the work profile that can be accessed from the personal profile and vice versa. A nonComplianceDetail with MANAGEMENT_MODE is reported if the device does not have a work profile. # Cross-profile policies applied on the device.
    "crossProfileCopyPaste": "A String", # Whether text copied from one profile (personal or work) can be pasted in the other profile.
    "crossProfileDataSharing": "A String", # Whether data from one profile (personal or work) can be shared with apps in the other profile. Specifically controls simple data sharing via intents. Management of other cross-profile communication channels, such as contact search, copy/paste, or connected work & personal apps, are configured separately.
    "exemptionsToShowWorkContactsInPersonalProfile": { # A list of package names. # List of apps which are excluded from the ShowWorkContactsInPersonalProfile setting. For this to be set, ShowWorkContactsInPersonalProfile must be set to one of the following values: SHOW_WORK_CONTACTS_IN_PERSONAL_PROFILE_ALLOWED. In this case, these exemptions act as a blocklist. SHOW_WORK_CONTACTS_IN_PERSONAL_PROFILE_DISALLOWED. In this case, these exemptions act as an allowlist. SHOW_WORK_CONTACTS_IN_PERSONAL_PROFILE_DISALLOWED_EXCEPT_SYSTEM. In this case, these exemptions act as an allowlist, in addition to the already allowlisted system apps.Supported on Android 14 and above. A nonComplianceDetail with API_LEVEL is reported if the Android version is less than 14.
      "packageNames": [ # A list of package names.
        "A String",
      ],
    },
    "showWorkContactsInPersonalProfile": "A String", # Whether personal apps can access contacts stored in the work profile.See also exemptions_to_show_work_contacts_in_personal_profile.
    "workProfileWidgetsDefault": "A String", # Specifies the default behaviour for work profile widgets. If the policy does not specify work_profile_widgets for a specific application, it will behave according to the value specified here.
  },
  "dataRoamingDisabled": True or False, # Whether roaming data services are disabled.
  "debuggingFeaturesAllowed": True or False, # Whether the user is allowed to enable debugging features.
  "defaultPermissionPolicy": "A String", # The default permission policy for runtime permission requests.
  "deviceConnectivityManagement": { # Covers controls for device connectivity such as Wi-Fi, USB data access, keyboard/mouse connections, and more. # Covers controls for device connectivity such as Wi-Fi, USB data access, keyboard/mouse connections, and more.
    "configureWifi": "A String", # Controls Wi-Fi configuring privileges. Based on the option set, user will have either full or limited or no control in configuring Wi-Fi networks.
    "tetheringSettings": "A String", # Controls tethering settings. Based on the value set, the user is partially or fully disallowed from using different forms of tethering.
    "usbDataAccess": "A String", # Controls what files and/or data can be transferred via USB. Supported only on company-owned devices.
    "wifiDirectSettings": "A String", # Controls configuring and using Wi-Fi direct settings. Supported on company-owned devices running Android 13 and above.
    "wifiSsidPolicy": { # Restrictions on which Wi-Fi SSIDs the device can connect to. Note that this does not affect which networks can be configured on the device. Supported on company-owned devices running Android 13 and above. # Restrictions on which Wi-Fi SSIDs the device can connect to. Note that this does not affect which networks can be configured on the device. Supported on company-owned devices running Android 13 and above.
      "wifiSsidPolicyType": "A String", # Type of the Wi-Fi SSID policy to be applied.
      "wifiSsids": [ # Optional. List of Wi-Fi SSIDs that should be applied in the policy. This field must be non-empty when WifiSsidPolicyType is set to WIFI_SSID_ALLOWLIST. If this is set to a non-empty list, then a nonComplianceDetail detail with API_LEVEL is reported if the Android version is less than 13 and a nonComplianceDetail with MANAGEMENT_MODE is reported for non-company-owned devices.
        { # Represents a Wi-Fi SSID.
          "wifiSsid": "A String", # Required. Wi-Fi SSID represented as a string.
        },
      ],
    },
  },
  "deviceOwnerLockScreenInfo": { # Provides a user-facing message with locale info. The maximum message length is 4096 characters. # The device owner information to be shown on the lock screen.
    "defaultMessage": "A String", # The default message displayed if no localized message is specified or the user's locale doesn't match with any of the localized messages. A default message must be provided if any localized messages are provided.
    "localizedMessages": { # A map containing pairs, where locale is a well-formed BCP 47 language (https://www.w3.org/International/articles/language-tags/) code, such as en-US, es-ES, or fr.
      "a_key": "A String",
    },
  },
  "deviceRadioState": { # Controls for device radio settings. # Covers controls for radio state such as Wi-Fi, bluetooth, and more.
    "airplaneModeState": "A String", # Controls whether airplane mode can be toggled by the user or not.
    "cellularTwoGState": "A String", # Controls whether cellular 2G setting can be toggled by the user or not.
    "minimumWifiSecurityLevel": "A String", # The minimum required security level of Wi-Fi networks that the device can connect to.
    "ultraWidebandState": "A String", # Controls the state of the ultra wideband setting and whether the user can toggle it on or off.
    "wifiState": "A String", # Controls current state of Wi-Fi and if user can change its state.
  },
  "encryptionPolicy": "A String", # Whether encryption is enabled
  "ensureVerifyAppsEnabled": True or False, # Whether app verification is force-enabled.
  "factoryResetDisabled": True or False, # Whether factory resetting from settings is disabled.
  "frpAdminEmails": [ # Email addresses of device administrators for factory reset protection. When the device is factory reset, it will require one of these admins to log in with the Google account email and password to unlock the device. If no admins are specified, the device won't provide factory reset protection.
    "A String",
  ],
  "funDisabled": True or False, # Whether the user is allowed to have fun. Controls whether the Easter egg game in Settings is disabled.
  "installAppsDisabled": True or False, # Whether user installation of apps is disabled.
  "installUnknownSourcesAllowed": True or False, # This field has no effect.
  "keyguardDisabled": True or False, # If true, this disables the Lock Screen (https://source.android.com/docs/core/display/multi_display/lock-screen) for primary and/or secondary displays.
  "keyguardDisabledFeatures": [ # Disabled keyguard customizations, such as widgets.
    "A String",
  ],
  "kioskCustomLauncherEnabled": True or False, # Whether the kiosk custom launcher is enabled. This replaces the home screen with a launcher that locks down the device to the apps installed via the applications setting. Apps appear on a single page in alphabetical order. Use kioskCustomization to further configure the kiosk device behavior.
  "kioskCustomization": { # Settings controlling the behavior of a device in kiosk mode. To enable kiosk mode, set kioskCustomLauncherEnabled to true or specify an app in the policy with installType KIOSK. # Settings controlling the behavior of a device in kiosk mode. To enable kiosk mode, set kioskCustomLauncherEnabled to true or specify an app in the policy with installType KIOSK.
    "deviceSettings": "A String", # Specifies whether the Settings app is allowed in kiosk mode.
    "powerButtonActions": "A String", # Sets the behavior of a device in kiosk mode when a user presses and holds (long-presses) the Power button.
    "statusBar": "A String", # Specifies whether system info and notifications are disabled in kiosk mode.
    "systemErrorWarnings": "A String", # Specifies whether system error dialogs for crashed or unresponsive apps are blocked in kiosk mode. When blocked, the system will force-stop the app as if the user chooses the "close app" option on the UI.
    "systemNavigation": "A String", # Specifies which navigation features are enabled (e.g. Home, Overview buttons) in kiosk mode.
  },
  "locationMode": "A String", # The degree of location detection enabled.
  "longSupportMessage": { # Provides a user-facing message with locale info. The maximum message length is 4096 characters. # A message displayed to the user in the device administators settings screen.
    "defaultMessage": "A String", # The default message displayed if no localized message is specified or the user's locale doesn't match with any of the localized messages. A default message must be provided if any localized messages are provided.
    "localizedMessages": { # A map containing pairs, where locale is a well-formed BCP 47 language (https://www.w3.org/International/articles/language-tags/) code, such as en-US, es-ES, or fr.
      "a_key": "A String",
    },
  },
  "maximumTimeToLock": "A String", # Maximum time in milliseconds for user activity until the device locks. A value of 0 means there is no restriction.
  "microphoneAccess": "A String", # Controls the use of the microphone and whether the user has access to the microphone access toggle. This applies only on fully managed devices.
  "minimumApiLevel": 42, # The minimum allowed Android API level.
  "mobileNetworksConfigDisabled": True or False, # Whether configuring mobile networks is disabled.
  "modifyAccountsDisabled": True or False, # Whether adding or removing accounts is disabled.
  "mountPhysicalMediaDisabled": True or False, # Whether the user mounting physical external media is disabled.
  "name": "A String", # The name of the policy in the form enterprises/{enterpriseId}/policies/{policyId}.
  "networkEscapeHatchEnabled": True or False, # Whether the network escape hatch is enabled. If a network connection can't be made at boot time, the escape hatch prompts the user to temporarily connect to a network in order to refresh the device policy. After applying policy, the temporary network will be forgotten and the device will continue booting. This prevents being unable to connect to a network if there is no suitable network in the last policy and the device boots into an app in lock task mode, or the user is otherwise unable to reach device settings.Note: Setting wifiConfigDisabled to true will override this setting under specific circumstances. Please see wifiConfigDisabled for further details. Setting configureWifi to DISALLOW_CONFIGURING_WIFI will override this setting under specific circumstances. Please see DISALLOW_CONFIGURING_WIFI for further details.
  "networkResetDisabled": True or False, # Whether resetting network settings is disabled.
  "oncCertificateProviders": [ # This feature is not generally available.
    { # This feature is not generally available.
      "certificateReferences": [ # This feature is not generally available.
        "A String",
      ],
      "contentProviderEndpoint": { # This feature is not generally available. # This feature is not generally available.
        "packageName": "A String", # This feature is not generally available.
        "signingCertsSha256": [ # Required. This feature is not generally available.
          "A String",
        ],
        "uri": "A String", # This feature is not generally available.
      },
    },
  ],
  "openNetworkConfiguration": { # Network configuration for the device. See configure networks for more information.
    "a_key": "", # Properties of the object.
  },
  "outgoingBeamDisabled": True or False, # Whether using NFC to beam data from apps is disabled.
  "outgoingCallsDisabled": True or False, # Whether outgoing calls are disabled.
  "passwordPolicies": [ # Password requirement policies. Different policies can be set for work profile or fully managed devices by setting the password_scope field in the policy.
    { # Requirements for the password used to unlock a device.
      "maximumFailedPasswordsForWipe": 42, # Number of incorrect device-unlock passwords that can be entered before a device is wiped. A value of 0 means there is no restriction.
      "passwordExpirationTimeout": "A String", # Password expiration timeout.
      "passwordHistoryLength": 42, # The length of the password history. After setting this field, the user won't be able to enter a new password that is the same as any password in the history. A value of 0 means there is no restriction.
      "passwordMinimumLength": 42, # The minimum allowed password length. A value of 0 means there is no restriction. Only enforced when password_quality is NUMERIC, NUMERIC_COMPLEX, ALPHABETIC, ALPHANUMERIC, or COMPLEX.
      "passwordMinimumLetters": 42, # Minimum number of letters required in the password. Only enforced when password_quality is COMPLEX.
      "passwordMinimumLowerCase": 42, # Minimum number of lower case letters required in the password. Only enforced when password_quality is COMPLEX.
      "passwordMinimumNonLetter": 42, # Minimum number of non-letter characters (numerical digits or symbols) required in the password. Only enforced when password_quality is COMPLEX.
      "passwordMinimumNumeric": 42, # Minimum number of numerical digits required in the password. Only enforced when password_quality is COMPLEX.
      "passwordMinimumSymbols": 42, # Minimum number of symbols required in the password. Only enforced when password_quality is COMPLEX.
      "passwordMinimumUpperCase": 42, # Minimum number of upper case letters required in the password. Only enforced when password_quality is COMPLEX.
      "passwordQuality": "A String", # The required password quality.
      "passwordScope": "A String", # The scope that the password requirement applies to.
      "requirePasswordUnlock": "A String", # The length of time after a device or work profile is unlocked using a strong form of authentication (password, PIN, pattern) that it can be unlocked using any other authentication method (e.g. fingerprint, trust agents, face). After the specified time period elapses, only strong forms of authentication can be used to unlock the device or work profile.
      "unifiedLockSettings": "A String", # Controls whether a unified lock is allowed for the device and the work profile, on devices running Android 9 and above with a work profile. This can be set only if password_scope is set to SCOPE_PROFILE, the policy will be rejected otherwise. If user has not set a separate work lock and this field is set to REQUIRE_SEPARATE_WORK_LOCK, a NonComplianceDetail is reported with nonComplianceReason set to USER_ACTION.
    },
  ],
  "passwordRequirements": { # Requirements for the password used to unlock a device. # Password requirements. The field password_requirements.require_password_unlock must not be set. DEPRECATED - Use passwordPolicies.Note:Complexity-based values of PasswordQuality, that is, COMPLEXITY_LOW, COMPLEXITY_MEDIUM, and COMPLEXITY_HIGH, cannot be used here. unified_lock_settings cannot be used here.
    "maximumFailedPasswordsForWipe": 42, # Number of incorrect device-unlock passwords that can be entered before a device is wiped. A value of 0 means there is no restriction.
    "passwordExpirationTimeout": "A String", # Password expiration timeout.
    "passwordHistoryLength": 42, # The length of the password history. After setting this field, the user won't be able to enter a new password that is the same as any password in the history. A value of 0 means there is no restriction.
    "passwordMinimumLength": 42, # The minimum allowed password length. A value of 0 means there is no restriction. Only enforced when password_quality is NUMERIC, NUMERIC_COMPLEX, ALPHABETIC, ALPHANUMERIC, or COMPLEX.
    "passwordMinimumLetters": 42, # Minimum number of letters required in the password. Only enforced when password_quality is COMPLEX.
    "passwordMinimumLowerCase": 42, # Minimum number of lower case letters required in the password. Only enforced when password_quality is COMPLEX.
    "passwordMinimumNonLetter": 42, # Minimum number of non-letter characters (numerical digits or symbols) required in the password. Only enforced when password_quality is COMPLEX.
    "passwordMinimumNumeric": 42, # Minimum number of numerical digits required in the password. Only enforced when password_quality is COMPLEX.
    "passwordMinimumSymbols": 42, # Minimum number of symbols required in the password. Only enforced when password_quality is COMPLEX.
    "passwordMinimumUpperCase": 42, # Minimum number of upper case letters required in the password. Only enforced when password_quality is COMPLEX.
    "passwordQuality": "A String", # The required password quality.
    "passwordScope": "A String", # The scope that the password requirement applies to.
    "requirePasswordUnlock": "A String", # The length of time after a device or work profile is unlocked using a strong form of authentication (password, PIN, pattern) that it can be unlocked using any other authentication method (e.g. fingerprint, trust agents, face). After the specified time period elapses, only strong forms of authentication can be used to unlock the device or work profile.
    "unifiedLockSettings": "A String", # Controls whether a unified lock is allowed for the device and the work profile, on devices running Android 9 and above with a work profile. This can be set only if password_scope is set to SCOPE_PROFILE, the policy will be rejected otherwise. If user has not set a separate work lock and this field is set to REQUIRE_SEPARATE_WORK_LOCK, a NonComplianceDetail is reported with nonComplianceReason set to USER_ACTION.
  },
  "permissionGrants": [ # Explicit permission or group grants or denials for all apps. These values override the default_permission_policy.
    { # Configuration for an Android permission and its grant state.
      "permission": "A String", # The Android permission or group, e.g. android.permission.READ_CALENDAR or android.permission_group.CALENDAR.
      "policy": "A String", # The policy for granting the permission.
    },
  ],
  "permittedAccessibilityServices": { # A list of package names. # Specifies permitted accessibility services. If the field is not set, any accessibility service can be used. If the field is set, only the accessibility services in this list and the system's built-in accessibility service can be used. In particular, if the field is set to empty, only the system's built-in accessibility servicess can be used. This can be set on fully managed devices and on work profiles. When applied to a work profile, this affects both the personal profile and the work profile.
    "packageNames": [ # A list of package names.
      "A String",
    ],
  },
  "permittedInputMethods": { # A list of package names. # If present, only the input methods provided by packages in this list are permitted. If this field is present, but the list is empty, then only system input methods are permitted.
    "packageNames": [ # A list of package names.
      "A String",
    ],
  },
  "persistentPreferredActivities": [ # Default intent handler activities.
    { # A default activity for handling intents that match a particular intent filter. Note: To set up a kiosk, use InstallType to KIOSK rather than use persistent preferred activities.
      "actions": [ # The intent actions to match in the filter. If any actions are included in the filter, then an intent's action must be one of those values for it to match. If no actions are included, the intent action is ignored.
        "A String",
      ],
      "categories": [ # The intent categories to match in the filter. An intent includes the categories that it requires, all of which must be included in the filter in order to match. In other words, adding a category to the filter has no impact on matching unless that category is specified in the intent.
        "A String",
      ],
      "receiverActivity": "A String", # The activity that should be the default intent handler. This should be an Android component name, e.g. com.android.enterprise.app/.MainActivity. Alternatively, the value may be the package name of an app, which causes Android Device Policy to choose an appropriate activity from the app to handle the intent.
    },
  ],
  "personalUsagePolicies": { # Policies controlling personal usage on a company-owned device with a work profile. # Policies managing personal usage on a company-owned device.
    "accountTypesWithManagementDisabled": [ # Account types that can't be managed by the user.
      "A String",
    ],
    "cameraDisabled": True or False, # If true, the camera is disabled on the personal profile.
    "maxDaysWithWorkOff": 42, # Controls how long the work profile can stay off. The minimum duration must be at least 3 days. Other details are as follows: - If the duration is set to 0, the feature is turned off. - If the duration is set to a value smaller than the minimum duration, the feature returns an error. *Note:* If you want to avoid personal profiles being suspended during long periods of off-time, you can temporarily set a large value for this parameter.
    "personalApplications": [ # Policy applied to applications in the personal profile.
      { # Policies for apps in the personal profile of a company-owned device with a work profile.
        "installType": "A String", # The type of installation to perform.
        "packageName": "A String", # The package name of the application.
      },
    ],
    "personalPlayStoreMode": "A String", # Used together with personalApplications to control how apps in the personal profile are allowed or blocked.
    "screenCaptureDisabled": True or False, # If true, screen capture is disabled for all users.
  },
  "playStoreMode": "A String", # This mode controls which apps are available to the user in the Play Store and the behavior on the device when apps are removed from the policy.
  "policyEnforcementRules": [ # Rules that define the behavior when a particular policy can not be applied on device
    { # A rule that defines the actions to take if a device or work profile is not compliant with the policy specified in settingName. In the case of multiple matching or multiple triggered enforcement rules, a merge will occur with the most severe action being taken. However, all triggered rules are still kept track of: this includes initial trigger time and all associated non-compliance details. In the situation where the most severe enforcement rule is satisfied, the next most appropriate action is applied.
      "blockAction": { # An action to block access to apps and data on a fully managed device or in a work profile. This action also triggers a device or work profile to displays a user-facing notification with information (where possible) on how to correct the compliance issue. Note: wipeAction must also be specified. # An action to block access to apps and data on a company owned device or in a work profile. This action also triggers a user-facing notification with information (where possible) on how to correct the compliance issue. Note: wipeAction must also be specified.
        "blockAfterDays": 42, # Number of days the policy is non-compliant before the device or work profile is blocked. To block access immediately, set to 0. blockAfterDays must be less than wipeAfterDays.
        "blockScope": "A String", # Specifies the scope of this BlockAction. Only applicable to devices that are company-owned.
      },
      "settingName": "A String", # The top-level policy to enforce. For example, applications or passwordPolicies.
      "wipeAction": { # An action to reset a company owned device or delete a work profile. Note: blockAction must also be specified. # An action to reset a company owned device or delete a work profile. Note: blockAction must also be specified.
        "preserveFrp": True or False, # Whether the factory-reset protection data is preserved on the device. This setting doesn’t apply to work profiles.
        "wipeAfterDays": 42, # Number of days the policy is non-compliant before the device or work profile is wiped. wipeAfterDays must be greater than blockAfterDays.
      },
    },
  ],
  "preferentialNetworkService": "A String", # Controls whether preferential network service is enabled on the work profile. For example, an organization may have an agreement with a carrier that all of the work data from its employees' devices will be sent via a network service dedicated for enterprise use. An example of a supported preferential network service is the enterprise slice on 5G networks. This has no effect on fully managed devices.
  "printingPolicy": "A String", # Optional. Controls whether printing is allowed. This is supported on devices running Android 9 and above. .
  "privateKeySelectionEnabled": True or False, # Allows showing UI on a device for a user to choose a private key alias if there are no matching rules in ChoosePrivateKeyRules. For devices below Android P, setting this may leave enterprise keys vulnerable. This value will have no effect if any application has CERT_SELECTION delegation scope.
  "recommendedGlobalProxy": { # Configuration info for an HTTP proxy. For a direct proxy, set the host, port, and excluded_hosts fields. For a PAC script proxy, set the pac_uri field. # The network-independent global HTTP proxy. Typically proxies should be configured per-network in open_network_configuration. However for unusual configurations like general internal filtering a global HTTP proxy may be useful. If the proxy is not accessible, network access may break. The global proxy is only a recommendation and some apps may ignore it.
    "excludedHosts": [ # For a direct proxy, the hosts for which the proxy is bypassed. The host names may contain wildcards such as *.example.com.
      "A String",
    ],
    "host": "A String", # The host of the direct proxy.
    "pacUri": "A String", # The URI of the PAC script used to configure the proxy.
    "port": 42, # The port of the direct proxy.
  },
  "removeUserDisabled": True or False, # Whether removing other users is disabled.
  "safeBootDisabled": True or False, # Whether rebooting the device into safe boot is disabled.
  "screenCaptureDisabled": True or False, # Whether screen capture is disabled.
  "setUserIconDisabled": True or False, # Whether changing the user icon is disabled.
  "setWallpaperDisabled": True or False, # Whether changing the wallpaper is disabled.
  "setupActions": [ # Action to take during the setup process. At most one action may be specified.
    { # An action executed during setup.
      "description": { # Provides a user-facing message with locale info. The maximum message length is 4096 characters. # Description of this action.
        "defaultMessage": "A String", # The default message displayed if no localized message is specified or the user's locale doesn't match with any of the localized messages. A default message must be provided if any localized messages are provided.
        "localizedMessages": { # A map containing pairs, where locale is a well-formed BCP 47 language (https://www.w3.org/International/articles/language-tags/) code, such as en-US, es-ES, or fr.
          "a_key": "A String",
        },
      },
      "launchApp": { # An action to launch an app. # An action to launch an app. The app will be launched with an intent containing an extra with key com.google.android.apps.work.clouddpc.EXTRA_LAUNCHED_AS_SETUP_ACTION set to the boolean value true to indicate that this is a setup action flow. If SetupAction references an app, the corresponding installType in the application policy must be set as REQUIRED_FOR_SETUP or said setup will fail.
        "packageName": "A String", # Package name of app to be launched
      },
      "title": { # Provides a user-facing message with locale info. The maximum message length is 4096 characters. # Title of this action.
        "defaultMessage": "A String", # The default message displayed if no localized message is specified or the user's locale doesn't match with any of the localized messages. A default message must be provided if any localized messages are provided.
        "localizedMessages": { # A map containing pairs, where locale is a well-formed BCP 47 language (https://www.w3.org/International/articles/language-tags/) code, such as en-US, es-ES, or fr.
          "a_key": "A String",
        },
      },
    },
  ],
  "shareLocationDisabled": True or False, # Whether location sharing is disabled. share_location_disabled is supported for both fully managed devices and personally owned work profiles.
  "shortSupportMessage": { # Provides a user-facing message with locale info. The maximum message length is 4096 characters. # A message displayed to the user in the settings screen wherever functionality has been disabled by the admin. If the message is longer than 200 characters it may be truncated.
    "defaultMessage": "A String", # The default message displayed if no localized message is specified or the user's locale doesn't match with any of the localized messages. A default message must be provided if any localized messages are provided.
    "localizedMessages": { # A map containing pairs, where locale is a well-formed BCP 47 language (https://www.w3.org/International/articles/language-tags/) code, such as en-US, es-ES, or fr.
      "a_key": "A String",
    },
  },
  "skipFirstUseHintsEnabled": True or False, # Flag to skip hints on the first use. Enterprise admin can enable the system recommendation for apps to skip their user tutorial and other introductory hints on first start-up.
  "smsDisabled": True or False, # Whether sending and receiving SMS messages is disabled.
  "statusBarDisabled": True or False, # Whether the status bar is disabled. This disables notifications, quick settings, and other screen overlays that allow escape from full-screen mode. DEPRECATED. To disable the status bar on a kiosk device, use InstallType KIOSK or kioskCustomLauncherEnabled.
  "statusReportingSettings": { # Settings controlling the behavior of status reports. # Status reporting settings
    "applicationReportingSettings": { # Settings controlling the behavior of application reports. # Application reporting settings. Only applicable if application_reports_enabled is true.
      "includeRemovedApps": True or False, # Whether removed apps are included in application reports.
    },
    "applicationReportsEnabled": True or False, # Whether app reports are enabled.
    "commonCriteriaModeEnabled": True or False, # Whether Common Criteria Mode reporting is enabled.
    "deviceSettingsEnabled": True or False, # Whether device settings reporting is enabled.
    "displayInfoEnabled": True or False, # Whether displays reporting is enabled. Report data is not available for personally owned devices with work profiles.
    "hardwareStatusEnabled": True or False, # Whether hardware status reporting is enabled. Report data is not available for personally owned devices with work profiles.
    "memoryInfoEnabled": True or False, # Whether memory event reporting is enabled.
    "networkInfoEnabled": True or False, # Whether network info reporting is enabled.
    "powerManagementEventsEnabled": True or False, # Whether power management event reporting is enabled. Report data is not available for personally owned devices with work profiles.
    "softwareInfoEnabled": True or False, # Whether software info reporting is enabled.
    "systemPropertiesEnabled": True or False, # Whether system properties reporting is enabled.
  },
  "stayOnPluggedModes": [ # The battery plugged in modes for which the device stays on. When using this setting, it is recommended to clear maximum_time_to_lock so that the device doesn't lock itself while it stays on.
    "A String",
  ],
  "systemUpdate": { # Configuration for managing system updatesNote: Google Play system updates (https://source.android.com/docs/core/ota/modular-system) (also called Mainline updates) are automatically downloaded but require a device reboot to be installed. Refer to the mainline section in Manage system updates (https://developer.android.com/work/dpc/system-updates#mainline) for further details. # The system update policy, which controls how OS updates are applied. If the update type is WINDOWED, the update window will automatically apply to Play app updates as well.Note: Google Play system updates (https://source.android.com/docs/core/ota/modular-system) (also called Mainline updates) are automatically downloaded and require a device reboot to be installed. Refer to the mainline section in Manage system updates (https://developer.android.com/work/dpc/system-updates#mainline) for further details.
    "endMinutes": 42, # If the type is WINDOWED, the end of the maintenance window, measured as the number of minutes after midnight in device's local time. This value must be between 0 and 1439, inclusive. If this value is less than start_minutes, then the maintenance window spans midnight. If the maintenance window specified is smaller than 30 minutes, the actual window is extended to 30 minutes beyond the start time.
    "freezePeriods": [ # An annually repeating time period in which over-the-air (OTA) system updates are postponed to freeze the OS version running on a device. To prevent freezing the device indefinitely, each freeze period must be separated by at least 60 days.
      { # A system freeze period. When a device’s clock is within the freeze period, all incoming system updates (including security patches) are blocked and won’t be installed.When the device is outside any set freeze periods, the normal policy behavior (automatic, windowed, or postponed) applies.Leap years are ignored in freeze period calculations, in particular: If Feb. 29th is set as the start or end date of a freeze period, the freeze period will start or end on Feb. 28th instead. When a device’s system clock reads Feb. 29th, it’s treated as Feb. 28th. When calculating the number of days in a freeze period or the time between two freeze periods, Feb. 29th is ignored and not counted as a day.Note: For Freeze Periods to take effect, SystemUpdateType cannot be specified as SYSTEM_UPDATE_TYPE_UNSPECIFIED, because freeze periods require a defined policy to be specified.
        "endDate": { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: A full date, with non-zero year, month, and day values. A month and day, with a zero year (for example, an anniversary). A year on its own, with a zero month and a zero day. A year and month, with a zero day (for example, a credit card expiration date).Related types: google.type.TimeOfDay google.type.DateTime google.protobuf.Timestamp # The end date (inclusive) of the freeze period. Must be no later than 90 days from the start date. If the end date is earlier than the start date, the freeze period is considered wrapping year-end. Note: year must not be set. For example, {"month": 1,"date": 30}.
          "day": 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.
          "month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
          "year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
        },
        "startDate": { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: A full date, with non-zero year, month, and day values. A month and day, with a zero year (for example, an anniversary). A year on its own, with a zero month and a zero day. A year and month, with a zero day (for example, a credit card expiration date).Related types: google.type.TimeOfDay google.type.DateTime google.protobuf.Timestamp # The start date (inclusive) of the freeze period. Note: year must not be set. For example, {"month": 1,"date": 30}.
          "day": 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.
          "month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
          "year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
        },
      },
    ],
    "startMinutes": 42, # If the type is WINDOWED, the start of the maintenance window, measured as the number of minutes after midnight in the device's local time. This value must be between 0 and 1439, inclusive.
    "type": "A String", # The type of system update to configure.
  },
  "tetheringConfigDisabled": True or False, # Whether configuring tethering and portable hotspots is disabled. If tetheringSettings is set to anything other than TETHERING_SETTINGS_UNSPECIFIED, this setting is ignored.
  "uninstallAppsDisabled": True or False, # Whether user uninstallation of applications is disabled. This prevents apps from being uninstalled, even those removed using applications
  "unmuteMicrophoneDisabled": True or False, # If microphone_access is set to any value other than MICROPHONE_ACCESS_UNSPECIFIED, this has no effect. Otherwise this field controls whether microphones are disabled: If true, all microphones are disabled, otherwise they are available. This is available only on fully managed devices.
  "usageLog": { # Controls types of device activity logs collected from the device and reported via Pub/Sub notification (https://developers.google.com/android/management/notifications). # Configuration of device activity logging.
    "enabledLogTypes": [ # Specifies which log types are enabled. Note that users will receive on-device messaging when usage logging is enabled.
      "A String",
    ],
    "uploadOnCellularAllowed": [ # Specifies which of the enabled log types can be uploaded over mobile data. By default logs are queued for upload when the device connects to WiFi.
      "A String",
    ],
  },
  "usbFileTransferDisabled": True or False, # Whether transferring files over USB is disabled. This is supported only on company-owned devices.
  "usbMassStorageEnabled": True or False, # Whether USB storage is enabled. Deprecated.
  "version": "A String", # The version of the policy. This is a read-only field. The version is incremented each time the policy is updated.
  "vpnConfigDisabled": True or False, # Whether configuring VPN is disabled.
  "wifiConfigDisabled": True or False, # Whether configuring Wi-Fi networks is disabled. Supported on fully managed devices and work profiles on company-owned devices. For fully managed devices, setting this to true removes all configured networks and retains only the networks configured using openNetworkConfiguration. For work profiles on company-owned devices, existing configured networks are not affected and the user is not allowed to add, remove, or modify Wi-Fi networks. If configureWifi is set to anything other than CONFIGURE_WIFI_UNSPECIFIED, this setting is ignored. Note: If a network connection can't be made at boot time and configuring Wi-Fi is disabled then network escape hatch will be shown in order to refresh the device policy (see networkEscapeHatchEnabled).
  "wifiConfigsLockdownEnabled": True or False, # DEPRECATED - Use wifi_config_disabled.
}

  updateMask: string, The field mask indicating the fields to update. If not set, all modifiable fields will be modified.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # A policy resource represents a group of settings that govern the behavior of a managed device and the apps installed on it.
  "accountTypesWithManagementDisabled": [ # Account types that can't be managed by the user.
    "A String",
  ],
  "addUserDisabled": True or False, # Whether adding new users and profiles is disabled.
  "adjustVolumeDisabled": True or False, # Whether adjusting the master volume is disabled. Also mutes the device.
  "advancedSecurityOverrides": { # Advanced security settings. In most cases, setting these is not needed. # Advanced security settings. In most cases, setting these is not needed.
    "commonCriteriaMode": "A String", # Controls Common Criteria Mode—security standards defined in the Common Criteria for Information Technology Security Evaluation (https://www.commoncriteriaportal.org/) (CC). Enabling Common Criteria Mode increases certain security components on a device, including AES-GCM encryption of Bluetooth Long Term Keys, and Wi-Fi configuration stores.Warning: Common Criteria Mode enforces a strict security model typically only required for IT products used in national security systems and other highly sensitive organizations. Standard device use may be affected. Only enabled if required.
    "developerSettings": "A String", # Controls access to developer settings: developer options and safe boot. Replaces safeBootDisabled (deprecated) and debuggingFeaturesAllowed (deprecated).
    "googlePlayProtectVerifyApps": "A String", # Whether Google Play Protect verification (https://support.google.com/accounts/answer/2812853) is enforced. Replaces ensureVerifyAppsEnabled (deprecated).
    "mtePolicy": "A String", # Optional. Controls Memory Tagging Extension (MTE) (https://source.android.com/docs/security/test/memory-safety/arm-mte) on the device. The device needs to be rebooted to apply changes to the MTE policy.
    "personalAppsThatCanReadWorkNotifications": [ # Personal apps that can read work profile notifications using a NotificationListenerService (https://developer.android.com/reference/android/service/notification/NotificationListenerService). By default, no personal apps (aside from system apps) can read work notifications. Each value in the list must be a package name.
      "A String",
    ],
    "untrustedAppsPolicy": "A String", # The policy for untrusted apps (apps from unknown sources) enforced on the device. Replaces install_unknown_sources_allowed (deprecated).
  },
  "alwaysOnVpnPackage": { # Configuration for an always-on VPN connection. # Configuration for an always-on VPN connection. Use with vpn_config_disabled to prevent modification of this setting.
    "lockdownEnabled": True or False, # Disallows networking when the VPN is not connected.
    "packageName": "A String", # The package name of the VPN app.
  },
  "androidDevicePolicyTracks": [ # This setting is not supported. Any value is ignored.
    "A String",
  ],
  "appAutoUpdatePolicy": "A String", # Recommended alternative: autoUpdateMode which is set per app, provides greater flexibility around update frequency.When autoUpdateMode is set to AUTO_UPDATE_POSTPONED or AUTO_UPDATE_HIGH_PRIORITY, this field has no effect.The app auto update policy, which controls when automatic app updates can be applied.
  "applications": [ # Policy applied to apps. This can have at most 3,000 elements.
    { # Policy for an individual app. Note: Application availability on a given device cannot be changed using this policy if installAppsDisabled is enabled. The maximum number of applications that you can specify per policy is 3,000.
      "accessibleTrackIds": [ # 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.
        "A String",
      ],
      "alwaysOnVpnLockdownExemption": "A String", # Specifies whether the app is allowed networking when the VPN is not connected and alwaysOnVpnPackage.lockdownEnabled is enabled. If set to VPN_LOCKDOWN_ENFORCED, the app is not allowed networking, and if set to VPN_LOCKDOWN_EXEMPTION, the app is allowed networking. Only supported on devices running Android 10 and above. If this is not supported by the device, the device will contain a NonComplianceDetail with non_compliance_reason set to API_LEVEL and a fieldPath. If this is not applicable to the app, the device will contain a NonComplianceDetail with non_compliance_reason set to UNSUPPORTED and a fieldPath. The fieldPath is set to applications[i].alwaysOnVpnLockdownExemption, where i is the index of the package in the applications policy.
      "autoUpdateMode": "A String", # Controls the auto-update mode for the app.
      "connectedWorkAndPersonalApp": "A String", # Controls whether the app can communicate with itself across a device’s work and personal profiles, subject to user consent.
      "credentialProviderPolicy": "A String", # Optional. Whether the app is allowed to act as a credential provider on Android 14 and above.
      "defaultPermissionPolicy": "A String", # 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": [ # The scopes delegated to the app from Android Device Policy. These provide additional privileges for the applications they are applied to.
        "A String",
      ],
      "disabled": True or False, # Whether the app is disabled. When disabled, the app data is still preserved.
      "extensionConfig": { # Configuration to enable an app as an extension app, with the capability of interacting with Android Device Policy offline. For Android versions 13 and above, extension apps are exempt from battery restrictions so will not be placed into the restricted App Standby Bucket (https://developer.android.com/topic/performance/appstandby#restricted-bucket). Extensions apps are also protected against users clearing their data or force-closing the application, although admins can continue to use the clear app data command on extension apps if needed for Android 13 and above. # 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.
        "notificationReceiver": "A String", # Fully qualified class name of the receiver service class for Android Device Policy to notify the extension app of any local command status updates.
        "signingKeyFingerprintsSha256": [ # Hex-encoded SHA-256 hash of the signing certificate of the extension app. Only hexadecimal string representations of 64 characters are valid.If not specified, the signature for the corresponding package name is obtained from the Play Store instead.If this list is empty, the signature of the extension app on the device must match the signature obtained from the Play Store for the app to be able to communicate with Android Device Policy.If this list is not empty, the signature of the extension app on the device must match one of the entries in this list for the app to be able to communicate with Android Device Policy.In production use cases, it is recommended to leave this empty.
          "A String",
        ],
      },
      "installConstraint": [ # Optional. The constraints for installing the app. You can specify a maximum of one InstallConstraint. Multiple constraints are rejected.
        { # Amongst apps with InstallType set to: FORCE_INSTALLED PREINSTALLEDthis defines a set of restrictions for the app installation. At least one of the fields must be set. When multiple fields are set, then all the constraints need to be satisfied for the app to be installed.
          "chargingConstraint": "A String", # Optional. Charging constraint.
          "deviceIdleConstraint": "A String", # Optional. Device idle constraint.
          "networkTypeConstraint": "A String", # Optional. Network type constraint.
        },
      ],
      "installPriority": 42, # Optional. Amongst apps with installType set to: FORCE_INSTALLED PREINSTALLEDthis controls the relative priority of installation. A value of 0 (default) means this app has no priority over other apps. For values between 1 and 10,000, a lower value means a higher priority. Values outside of the range 0 to 10,000 inclusive are rejected.
      "installType": "A String", # The type of installation to perform.
      "lockTaskAllowed": True or False, # Whether the app is allowed to lock itself in full-screen mode. DEPRECATED. Use InstallType KIOSK or kioskCustomLauncherEnabled to configure a dedicated device.
      "managedConfiguration": { # 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
        "a_key": "", # Properties of the object.
      },
      "managedConfigurationTemplate": { # The managed configurations template for the app, saved from the managed configurations iframe. # The managed configurations template for the app, saved from the managed configurations iframe. This field is ignored if managed_configuration is set.
        "configurationVariables": { # Optional, a map containing configuration variables defined for the configuration.
          "a_key": "A String",
        },
        "templateId": "A String", # The ID of the managed configurations template.
      },
      "minimumVersionCode": 42, # 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": "A String", # The package name of the app. For example, com.google.android.youtube for the YouTube app.
      "permissionGrants": [ # Explicit permission grants or denials for the app. These values override the default_permission_policy and permission_grants which apply to all apps.
        { # Configuration for an Android permission and its grant state.
          "permission": "A String", # The Android permission or group, e.g. android.permission.READ_CALENDAR or android.permission_group.CALENDAR.
          "policy": "A String", # The policy for granting the permission.
        },
      ],
      "workProfileWidgets": "A String", # Specifies whether the app installed in the work profile is allowed to add widgets to the home screen.
    },
  ],
  "autoDateAndTimeZone": "A String", # Whether auto date, time, and time zone are enabled on a company-owned device. If this is set, then autoTimeRequired is ignored.
  "autoTimeRequired": True or False, # Whether auto time is required, which prevents the user from manually setting the date and time. If autoDateAndTimeZone is set, this field is ignored.
  "blockApplicationsEnabled": True or False, # Whether applications other than the ones configured in applications are blocked from being installed. When set, applications that were installed under a previous policy but no longer appear in the policy are automatically uninstalled.
  "bluetoothConfigDisabled": True or False, # Whether configuring bluetooth is disabled.
  "bluetoothContactSharingDisabled": True or False, # Whether bluetooth contact sharing is disabled.
  "bluetoothDisabled": True or False, # Whether bluetooth is disabled. Prefer this setting over bluetooth_config_disabled because bluetooth_config_disabled can be bypassed by the user.
  "cameraAccess": "A String", # Controls the use of the camera and whether the user has access to the camera access toggle.
  "cameraDisabled": True or False, # If camera_access is set to any value other than CAMERA_ACCESS_UNSPECIFIED, this has no effect. Otherwise this field controls whether cameras are disabled: If true, all cameras are disabled, otherwise they are available. For fully managed devices this field applies for all apps on the device. For work profiles, this field applies only to apps in the work profile, and the camera access of apps outside the work profile is unaffected.
  "cellBroadcastsConfigDisabled": True or False, # Whether configuring cell broadcast is disabled.
  "choosePrivateKeyRules": [ # Rules for determining apps' access to private keys. See ChoosePrivateKeyRule for details. This must be empty if any application has CERT_SELECTION delegation scope.
    { # Controls apps' access to private keys. The rule determines which private key, if any, Android Device Policy grants to the specified app. Access is granted either when the app calls KeyChain.choosePrivateKeyAlias (https://developer.android.com/reference/android/security/KeyChain#choosePrivateKeyAlias%28android.app.Activity,%20android.security.KeyChainAliasCallback,%20java.lang.String[],%20java.security.Principal[],%20java.lang.String,%20int,%20java.lang.String%29) (or any overloads) to request a private key alias for a given URL, or for rules that are not URL-specific (that is, if urlPattern is not set, or set to the empty string or .*) on Android 11 and above, directly so that the app can call KeyChain.getPrivateKey (https://developer.android.com/reference/android/security/KeyChain#getPrivateKey%28android.content.Context,%20java.lang.String%29), without first having to call KeyChain.choosePrivateKeyAlias.When an app calls KeyChain.choosePrivateKeyAlias if more than one choosePrivateKeyRules matches, the last matching rule defines which key alias to return.
      "packageNames": [ # The package names to which this rule applies. The hash of the signing certificate for each app is verified against the hash provided by Play. If no package names are specified, then the alias is provided to all apps that call KeyChain.choosePrivateKeyAlias (https://developer.android.com/reference/android/security/KeyChain#choosePrivateKeyAlias%28android.app.Activity,%20android.security.KeyChainAliasCallback,%20java.lang.String[],%20java.security.Principal[],%20java.lang.String,%20int,%20java.lang.String%29) or any overloads (but not without calling KeyChain.choosePrivateKeyAlias, even on Android 11 and above). Any app with the same Android UID as a package specified here will have access when they call KeyChain.choosePrivateKeyAlias.
        "A String",
      ],
      "privateKeyAlias": "A String", # The alias of the private key to be used.
      "urlPattern": "A String", # The URL pattern to match against the URL of the request. If not set or empty, it matches all URLs. This uses the regular expression syntax of java.util.regex.Pattern.
    },
  ],
  "complianceRules": [ # Rules declaring which mitigating actions to take when a device is not compliant with its policy. When the conditions for multiple rules are satisfied, all of the mitigating actions for the rules are taken. There is a maximum limit of 100 rules. Use policy enforcement rules instead.
    { # A rule declaring which mitigating actions to take when a device is not compliant with its policy. For every rule, there is always an implicit mitigating action to set policy_compliant to false for the Device resource, and display a message on the device indicating that the device is not compliant with its policy. Other mitigating actions may optionally be taken as well, depending on the field values in the rule.
      "apiLevelCondition": { # A compliance rule condition which is satisfied if the Android Framework API level on the device doesn't meet a minimum requirement. There can only be one rule with this type of condition per policy. # A condition which is satisfied if the Android Framework API level on the device doesn't meet a minimum requirement.
        "minApiLevel": 42, # The minimum desired Android Framework API level. If the device doesn't meet the minimum requirement, this condition is satisfied. Must be greater than zero.
      },
      "disableApps": True or False, # If set to true, the rule includes a mitigating action to disable apps so that the device is effectively disabled, but app data is preserved. If the device is running an app in locked task mode, the app will be closed and a UI showing the reason for non-compliance will be displayed.
      "nonComplianceDetailCondition": { # A compliance rule condition which is satisfied if there exists any matching NonComplianceDetail for the device. A NonComplianceDetail matches a NonComplianceDetailCondition if all the fields which are set within the NonComplianceDetailCondition match the corresponding NonComplianceDetail fields. # A condition which is satisfied if there exists any matching NonComplianceDetail for the device.
        "nonComplianceReason": "A String", # The reason the device is not in compliance with the setting. If not set, then this condition matches any reason.
        "packageName": "A String", # The package name of the app that's out of compliance. If not set, then this condition matches any package name.
        "settingName": "A String", # The name of the policy setting. This is the JSON field name of a top-level Policy field. If not set, then this condition matches any setting name.
      },
      "packageNamesToDisable": [ # If set, the rule includes a mitigating action to disable apps specified in the list, but app data is preserved.
        "A String",
      ],
    },
  ],
  "createWindowsDisabled": True or False, # Whether creating windows besides app windows is disabled.
  "credentialProviderPolicyDefault": "A String", # Controls which apps are allowed to act as credential providers on Android 14 and above. These apps store credentials, see this (https://developer.android.com/training/sign-in/passkeys) and this (https://developer.android.com/reference/androidx/credentials/CredentialManager) for details. See also credentialProviderPolicy.
  "credentialsConfigDisabled": True or False, # Whether configuring user credentials is disabled.
  "crossProfilePolicies": { # Controls the data from the work profile that can be accessed from the personal profile and vice versa. A nonComplianceDetail with MANAGEMENT_MODE is reported if the device does not have a work profile. # Cross-profile policies applied on the device.
    "crossProfileCopyPaste": "A String", # Whether text copied from one profile (personal or work) can be pasted in the other profile.
    "crossProfileDataSharing": "A String", # Whether data from one profile (personal or work) can be shared with apps in the other profile. Specifically controls simple data sharing via intents. Management of other cross-profile communication channels, such as contact search, copy/paste, or connected work & personal apps, are configured separately.
    "exemptionsToShowWorkContactsInPersonalProfile": { # A list of package names. # List of apps which are excluded from the ShowWorkContactsInPersonalProfile setting. For this to be set, ShowWorkContactsInPersonalProfile must be set to one of the following values: SHOW_WORK_CONTACTS_IN_PERSONAL_PROFILE_ALLOWED. In this case, these exemptions act as a blocklist. SHOW_WORK_CONTACTS_IN_PERSONAL_PROFILE_DISALLOWED. In this case, these exemptions act as an allowlist. SHOW_WORK_CONTACTS_IN_PERSONAL_PROFILE_DISALLOWED_EXCEPT_SYSTEM. In this case, these exemptions act as an allowlist, in addition to the already allowlisted system apps.Supported on Android 14 and above. A nonComplianceDetail with API_LEVEL is reported if the Android version is less than 14.
      "packageNames": [ # A list of package names.
        "A String",
      ],
    },
    "showWorkContactsInPersonalProfile": "A String", # Whether personal apps can access contacts stored in the work profile.See also exemptions_to_show_work_contacts_in_personal_profile.
    "workProfileWidgetsDefault": "A String", # Specifies the default behaviour for work profile widgets. If the policy does not specify work_profile_widgets for a specific application, it will behave according to the value specified here.
  },
  "dataRoamingDisabled": True or False, # Whether roaming data services are disabled.
  "debuggingFeaturesAllowed": True or False, # Whether the user is allowed to enable debugging features.
  "defaultPermissionPolicy": "A String", # The default permission policy for runtime permission requests.
  "deviceConnectivityManagement": { # Covers controls for device connectivity such as Wi-Fi, USB data access, keyboard/mouse connections, and more. # Covers controls for device connectivity such as Wi-Fi, USB data access, keyboard/mouse connections, and more.
    "configureWifi": "A String", # Controls Wi-Fi configuring privileges. Based on the option set, user will have either full or limited or no control in configuring Wi-Fi networks.
    "tetheringSettings": "A String", # Controls tethering settings. Based on the value set, the user is partially or fully disallowed from using different forms of tethering.
    "usbDataAccess": "A String", # Controls what files and/or data can be transferred via USB. Supported only on company-owned devices.
    "wifiDirectSettings": "A String", # Controls configuring and using Wi-Fi direct settings. Supported on company-owned devices running Android 13 and above.
    "wifiSsidPolicy": { # Restrictions on which Wi-Fi SSIDs the device can connect to. Note that this does not affect which networks can be configured on the device. Supported on company-owned devices running Android 13 and above. # Restrictions on which Wi-Fi SSIDs the device can connect to. Note that this does not affect which networks can be configured on the device. Supported on company-owned devices running Android 13 and above.
      "wifiSsidPolicyType": "A String", # Type of the Wi-Fi SSID policy to be applied.
      "wifiSsids": [ # Optional. List of Wi-Fi SSIDs that should be applied in the policy. This field must be non-empty when WifiSsidPolicyType is set to WIFI_SSID_ALLOWLIST. If this is set to a non-empty list, then a nonComplianceDetail detail with API_LEVEL is reported if the Android version is less than 13 and a nonComplianceDetail with MANAGEMENT_MODE is reported for non-company-owned devices.
        { # Represents a Wi-Fi SSID.
          "wifiSsid": "A String", # Required. Wi-Fi SSID represented as a string.
        },
      ],
    },
  },
  "deviceOwnerLockScreenInfo": { # Provides a user-facing message with locale info. The maximum message length is 4096 characters. # The device owner information to be shown on the lock screen.
    "defaultMessage": "A String", # The default message displayed if no localized message is specified or the user's locale doesn't match with any of the localized messages. A default message must be provided if any localized messages are provided.
    "localizedMessages": { # A map containing pairs, where locale is a well-formed BCP 47 language (https://www.w3.org/International/articles/language-tags/) code, such as en-US, es-ES, or fr.
      "a_key": "A String",
    },
  },
  "deviceRadioState": { # Controls for device radio settings. # Covers controls for radio state such as Wi-Fi, bluetooth, and more.
    "airplaneModeState": "A String", # Controls whether airplane mode can be toggled by the user or not.
    "cellularTwoGState": "A String", # Controls whether cellular 2G setting can be toggled by the user or not.
    "minimumWifiSecurityLevel": "A String", # The minimum required security level of Wi-Fi networks that the device can connect to.
    "ultraWidebandState": "A String", # Controls the state of the ultra wideband setting and whether the user can toggle it on or off.
    "wifiState": "A String", # Controls current state of Wi-Fi and if user can change its state.
  },
  "encryptionPolicy": "A String", # Whether encryption is enabled
  "ensureVerifyAppsEnabled": True or False, # Whether app verification is force-enabled.
  "factoryResetDisabled": True or False, # Whether factory resetting from settings is disabled.
  "frpAdminEmails": [ # Email addresses of device administrators for factory reset protection. When the device is factory reset, it will require one of these admins to log in with the Google account email and password to unlock the device. If no admins are specified, the device won't provide factory reset protection.
    "A String",
  ],
  "funDisabled": True or False, # Whether the user is allowed to have fun. Controls whether the Easter egg game in Settings is disabled.
  "installAppsDisabled": True or False, # Whether user installation of apps is disabled.
  "installUnknownSourcesAllowed": True or False, # This field has no effect.
  "keyguardDisabled": True or False, # If true, this disables the Lock Screen (https://source.android.com/docs/core/display/multi_display/lock-screen) for primary and/or secondary displays.
  "keyguardDisabledFeatures": [ # Disabled keyguard customizations, such as widgets.
    "A String",
  ],
  "kioskCustomLauncherEnabled": True or False, # Whether the kiosk custom launcher is enabled. This replaces the home screen with a launcher that locks down the device to the apps installed via the applications setting. Apps appear on a single page in alphabetical order. Use kioskCustomization to further configure the kiosk device behavior.
  "kioskCustomization": { # Settings controlling the behavior of a device in kiosk mode. To enable kiosk mode, set kioskCustomLauncherEnabled to true or specify an app in the policy with installType KIOSK. # Settings controlling the behavior of a device in kiosk mode. To enable kiosk mode, set kioskCustomLauncherEnabled to true or specify an app in the policy with installType KIOSK.
    "deviceSettings": "A String", # Specifies whether the Settings app is allowed in kiosk mode.
    "powerButtonActions": "A String", # Sets the behavior of a device in kiosk mode when a user presses and holds (long-presses) the Power button.
    "statusBar": "A String", # Specifies whether system info and notifications are disabled in kiosk mode.
    "systemErrorWarnings": "A String", # Specifies whether system error dialogs for crashed or unresponsive apps are blocked in kiosk mode. When blocked, the system will force-stop the app as if the user chooses the "close app" option on the UI.
    "systemNavigation": "A String", # Specifies which navigation features are enabled (e.g. Home, Overview buttons) in kiosk mode.
  },
  "locationMode": "A String", # The degree of location detection enabled.
  "longSupportMessage": { # Provides a user-facing message with locale info. The maximum message length is 4096 characters. # A message displayed to the user in the device administators settings screen.
    "defaultMessage": "A String", # The default message displayed if no localized message is specified or the user's locale doesn't match with any of the localized messages. A default message must be provided if any localized messages are provided.
    "localizedMessages": { # A map containing pairs, where locale is a well-formed BCP 47 language (https://www.w3.org/International/articles/language-tags/) code, such as en-US, es-ES, or fr.
      "a_key": "A String",
    },
  },
  "maximumTimeToLock": "A String", # Maximum time in milliseconds for user activity until the device locks. A value of 0 means there is no restriction.
  "microphoneAccess": "A String", # Controls the use of the microphone and whether the user has access to the microphone access toggle. This applies only on fully managed devices.
  "minimumApiLevel": 42, # The minimum allowed Android API level.
  "mobileNetworksConfigDisabled": True or False, # Whether configuring mobile networks is disabled.
  "modifyAccountsDisabled": True or False, # Whether adding or removing accounts is disabled.
  "mountPhysicalMediaDisabled": True or False, # Whether the user mounting physical external media is disabled.
  "name": "A String", # The name of the policy in the form enterprises/{enterpriseId}/policies/{policyId}.
  "networkEscapeHatchEnabled": True or False, # Whether the network escape hatch is enabled. If a network connection can't be made at boot time, the escape hatch prompts the user to temporarily connect to a network in order to refresh the device policy. After applying policy, the temporary network will be forgotten and the device will continue booting. This prevents being unable to connect to a network if there is no suitable network in the last policy and the device boots into an app in lock task mode, or the user is otherwise unable to reach device settings.Note: Setting wifiConfigDisabled to true will override this setting under specific circumstances. Please see wifiConfigDisabled for further details. Setting configureWifi to DISALLOW_CONFIGURING_WIFI will override this setting under specific circumstances. Please see DISALLOW_CONFIGURING_WIFI for further details.
  "networkResetDisabled": True or False, # Whether resetting network settings is disabled.
  "oncCertificateProviders": [ # This feature is not generally available.
    { # This feature is not generally available.
      "certificateReferences": [ # This feature is not generally available.
        "A String",
      ],
      "contentProviderEndpoint": { # This feature is not generally available. # This feature is not generally available.
        "packageName": "A String", # This feature is not generally available.
        "signingCertsSha256": [ # Required. This feature is not generally available.
          "A String",
        ],
        "uri": "A String", # This feature is not generally available.
      },
    },
  ],
  "openNetworkConfiguration": { # Network configuration for the device. See configure networks for more information.
    "a_key": "", # Properties of the object.
  },
  "outgoingBeamDisabled": True or False, # Whether using NFC to beam data from apps is disabled.
  "outgoingCallsDisabled": True or False, # Whether outgoing calls are disabled.
  "passwordPolicies": [ # Password requirement policies. Different policies can be set for work profile or fully managed devices by setting the password_scope field in the policy.
    { # Requirements for the password used to unlock a device.
      "maximumFailedPasswordsForWipe": 42, # Number of incorrect device-unlock passwords that can be entered before a device is wiped. A value of 0 means there is no restriction.
      "passwordExpirationTimeout": "A String", # Password expiration timeout.
      "passwordHistoryLength": 42, # The length of the password history. After setting this field, the user won't be able to enter a new password that is the same as any password in the history. A value of 0 means there is no restriction.
      "passwordMinimumLength": 42, # The minimum allowed password length. A value of 0 means there is no restriction. Only enforced when password_quality is NUMERIC, NUMERIC_COMPLEX, ALPHABETIC, ALPHANUMERIC, or COMPLEX.
      "passwordMinimumLetters": 42, # Minimum number of letters required in the password. Only enforced when password_quality is COMPLEX.
      "passwordMinimumLowerCase": 42, # Minimum number of lower case letters required in the password. Only enforced when password_quality is COMPLEX.
      "passwordMinimumNonLetter": 42, # Minimum number of non-letter characters (numerical digits or symbols) required in the password. Only enforced when password_quality is COMPLEX.
      "passwordMinimumNumeric": 42, # Minimum number of numerical digits required in the password. Only enforced when password_quality is COMPLEX.
      "passwordMinimumSymbols": 42, # Minimum number of symbols required in the password. Only enforced when password_quality is COMPLEX.
      "passwordMinimumUpperCase": 42, # Minimum number of upper case letters required in the password. Only enforced when password_quality is COMPLEX.
      "passwordQuality": "A String", # The required password quality.
      "passwordScope": "A String", # The scope that the password requirement applies to.
      "requirePasswordUnlock": "A String", # The length of time after a device or work profile is unlocked using a strong form of authentication (password, PIN, pattern) that it can be unlocked using any other authentication method (e.g. fingerprint, trust agents, face). After the specified time period elapses, only strong forms of authentication can be used to unlock the device or work profile.
      "unifiedLockSettings": "A String", # Controls whether a unified lock is allowed for the device and the work profile, on devices running Android 9 and above with a work profile. This can be set only if password_scope is set to SCOPE_PROFILE, the policy will be rejected otherwise. If user has not set a separate work lock and this field is set to REQUIRE_SEPARATE_WORK_LOCK, a NonComplianceDetail is reported with nonComplianceReason set to USER_ACTION.
    },
  ],
  "passwordRequirements": { # Requirements for the password used to unlock a device. # Password requirements. The field password_requirements.require_password_unlock must not be set. DEPRECATED - Use passwordPolicies.Note:Complexity-based values of PasswordQuality, that is, COMPLEXITY_LOW, COMPLEXITY_MEDIUM, and COMPLEXITY_HIGH, cannot be used here. unified_lock_settings cannot be used here.
    "maximumFailedPasswordsForWipe": 42, # Number of incorrect device-unlock passwords that can be entered before a device is wiped. A value of 0 means there is no restriction.
    "passwordExpirationTimeout": "A String", # Password expiration timeout.
    "passwordHistoryLength": 42, # The length of the password history. After setting this field, the user won't be able to enter a new password that is the same as any password in the history. A value of 0 means there is no restriction.
    "passwordMinimumLength": 42, # The minimum allowed password length. A value of 0 means there is no restriction. Only enforced when password_quality is NUMERIC, NUMERIC_COMPLEX, ALPHABETIC, ALPHANUMERIC, or COMPLEX.
    "passwordMinimumLetters": 42, # Minimum number of letters required in the password. Only enforced when password_quality is COMPLEX.
    "passwordMinimumLowerCase": 42, # Minimum number of lower case letters required in the password. Only enforced when password_quality is COMPLEX.
    "passwordMinimumNonLetter": 42, # Minimum number of non-letter characters (numerical digits or symbols) required in the password. Only enforced when password_quality is COMPLEX.
    "passwordMinimumNumeric": 42, # Minimum number of numerical digits required in the password. Only enforced when password_quality is COMPLEX.
    "passwordMinimumSymbols": 42, # Minimum number of symbols required in the password. Only enforced when password_quality is COMPLEX.
    "passwordMinimumUpperCase": 42, # Minimum number of upper case letters required in the password. Only enforced when password_quality is COMPLEX.
    "passwordQuality": "A String", # The required password quality.
    "passwordScope": "A String", # The scope that the password requirement applies to.
    "requirePasswordUnlock": "A String", # The length of time after a device or work profile is unlocked using a strong form of authentication (password, PIN, pattern) that it can be unlocked using any other authentication method (e.g. fingerprint, trust agents, face). After the specified time period elapses, only strong forms of authentication can be used to unlock the device or work profile.
    "unifiedLockSettings": "A String", # Controls whether a unified lock is allowed for the device and the work profile, on devices running Android 9 and above with a work profile. This can be set only if password_scope is set to SCOPE_PROFILE, the policy will be rejected otherwise. If user has not set a separate work lock and this field is set to REQUIRE_SEPARATE_WORK_LOCK, a NonComplianceDetail is reported with nonComplianceReason set to USER_ACTION.
  },
  "permissionGrants": [ # Explicit permission or group grants or denials for all apps. These values override the default_permission_policy.
    { # Configuration for an Android permission and its grant state.
      "permission": "A String", # The Android permission or group, e.g. android.permission.READ_CALENDAR or android.permission_group.CALENDAR.
      "policy": "A String", # The policy for granting the permission.
    },
  ],
  "permittedAccessibilityServices": { # A list of package names. # Specifies permitted accessibility services. If the field is not set, any accessibility service can be used. If the field is set, only the accessibility services in this list and the system's built-in accessibility service can be used. In particular, if the field is set to empty, only the system's built-in accessibility servicess can be used. This can be set on fully managed devices and on work profiles. When applied to a work profile, this affects both the personal profile and the work profile.
    "packageNames": [ # A list of package names.
      "A String",
    ],
  },
  "permittedInputMethods": { # A list of package names. # If present, only the input methods provided by packages in this list are permitted. If this field is present, but the list is empty, then only system input methods are permitted.
    "packageNames": [ # A list of package names.
      "A String",
    ],
  },
  "persistentPreferredActivities": [ # Default intent handler activities.
    { # A default activity for handling intents that match a particular intent filter. Note: To set up a kiosk, use InstallType to KIOSK rather than use persistent preferred activities.
      "actions": [ # The intent actions to match in the filter. If any actions are included in the filter, then an intent's action must be one of those values for it to match. If no actions are included, the intent action is ignored.
        "A String",
      ],
      "categories": [ # The intent categories to match in the filter. An intent includes the categories that it requires, all of which must be included in the filter in order to match. In other words, adding a category to the filter has no impact on matching unless that category is specified in the intent.
        "A String",
      ],
      "receiverActivity": "A String", # The activity that should be the default intent handler. This should be an Android component name, e.g. com.android.enterprise.app/.MainActivity. Alternatively, the value may be the package name of an app, which causes Android Device Policy to choose an appropriate activity from the app to handle the intent.
    },
  ],
  "personalUsagePolicies": { # Policies controlling personal usage on a company-owned device with a work profile. # Policies managing personal usage on a company-owned device.
    "accountTypesWithManagementDisabled": [ # Account types that can't be managed by the user.
      "A String",
    ],
    "cameraDisabled": True or False, # If true, the camera is disabled on the personal profile.
    "maxDaysWithWorkOff": 42, # Controls how long the work profile can stay off. The minimum duration must be at least 3 days. Other details are as follows: - If the duration is set to 0, the feature is turned off. - If the duration is set to a value smaller than the minimum duration, the feature returns an error. *Note:* If you want to avoid personal profiles being suspended during long periods of off-time, you can temporarily set a large value for this parameter.
    "personalApplications": [ # Policy applied to applications in the personal profile.
      { # Policies for apps in the personal profile of a company-owned device with a work profile.
        "installType": "A String", # The type of installation to perform.
        "packageName": "A String", # The package name of the application.
      },
    ],
    "personalPlayStoreMode": "A String", # Used together with personalApplications to control how apps in the personal profile are allowed or blocked.
    "screenCaptureDisabled": True or False, # If true, screen capture is disabled for all users.
  },
  "playStoreMode": "A String", # This mode controls which apps are available to the user in the Play Store and the behavior on the device when apps are removed from the policy.
  "policyEnforcementRules": [ # Rules that define the behavior when a particular policy can not be applied on device
    { # A rule that defines the actions to take if a device or work profile is not compliant with the policy specified in settingName. In the case of multiple matching or multiple triggered enforcement rules, a merge will occur with the most severe action being taken. However, all triggered rules are still kept track of: this includes initial trigger time and all associated non-compliance details. In the situation where the most severe enforcement rule is satisfied, the next most appropriate action is applied.
      "blockAction": { # An action to block access to apps and data on a fully managed device or in a work profile. This action also triggers a device or work profile to displays a user-facing notification with information (where possible) on how to correct the compliance issue. Note: wipeAction must also be specified. # An action to block access to apps and data on a company owned device or in a work profile. This action also triggers a user-facing notification with information (where possible) on how to correct the compliance issue. Note: wipeAction must also be specified.
        "blockAfterDays": 42, # Number of days the policy is non-compliant before the device or work profile is blocked. To block access immediately, set to 0. blockAfterDays must be less than wipeAfterDays.
        "blockScope": "A String", # Specifies the scope of this BlockAction. Only applicable to devices that are company-owned.
      },
      "settingName": "A String", # The top-level policy to enforce. For example, applications or passwordPolicies.
      "wipeAction": { # An action to reset a company owned device or delete a work profile. Note: blockAction must also be specified. # An action to reset a company owned device or delete a work profile. Note: blockAction must also be specified.
        "preserveFrp": True or False, # Whether the factory-reset protection data is preserved on the device. This setting doesn’t apply to work profiles.
        "wipeAfterDays": 42, # Number of days the policy is non-compliant before the device or work profile is wiped. wipeAfterDays must be greater than blockAfterDays.
      },
    },
  ],
  "preferentialNetworkService": "A String", # Controls whether preferential network service is enabled on the work profile. For example, an organization may have an agreement with a carrier that all of the work data from its employees' devices will be sent via a network service dedicated for enterprise use. An example of a supported preferential network service is the enterprise slice on 5G networks. This has no effect on fully managed devices.
  "printingPolicy": "A String", # Optional. Controls whether printing is allowed. This is supported on devices running Android 9 and above. .
  "privateKeySelectionEnabled": True or False, # Allows showing UI on a device for a user to choose a private key alias if there are no matching rules in ChoosePrivateKeyRules. For devices below Android P, setting this may leave enterprise keys vulnerable. This value will have no effect if any application has CERT_SELECTION delegation scope.
  "recommendedGlobalProxy": { # Configuration info for an HTTP proxy. For a direct proxy, set the host, port, and excluded_hosts fields. For a PAC script proxy, set the pac_uri field. # The network-independent global HTTP proxy. Typically proxies should be configured per-network in open_network_configuration. However for unusual configurations like general internal filtering a global HTTP proxy may be useful. If the proxy is not accessible, network access may break. The global proxy is only a recommendation and some apps may ignore it.
    "excludedHosts": [ # For a direct proxy, the hosts for which the proxy is bypassed. The host names may contain wildcards such as *.example.com.
      "A String",
    ],
    "host": "A String", # The host of the direct proxy.
    "pacUri": "A String", # The URI of the PAC script used to configure the proxy.
    "port": 42, # The port of the direct proxy.
  },
  "removeUserDisabled": True or False, # Whether removing other users is disabled.
  "safeBootDisabled": True or False, # Whether rebooting the device into safe boot is disabled.
  "screenCaptureDisabled": True or False, # Whether screen capture is disabled.
  "setUserIconDisabled": True or False, # Whether changing the user icon is disabled.
  "setWallpaperDisabled": True or False, # Whether changing the wallpaper is disabled.
  "setupActions": [ # Action to take during the setup process. At most one action may be specified.
    { # An action executed during setup.
      "description": { # Provides a user-facing message with locale info. The maximum message length is 4096 characters. # Description of this action.
        "defaultMessage": "A String", # The default message displayed if no localized message is specified or the user's locale doesn't match with any of the localized messages. A default message must be provided if any localized messages are provided.
        "localizedMessages": { # A map containing pairs, where locale is a well-formed BCP 47 language (https://www.w3.org/International/articles/language-tags/) code, such as en-US, es-ES, or fr.
          "a_key": "A String",
        },
      },
      "launchApp": { # An action to launch an app. # An action to launch an app. The app will be launched with an intent containing an extra with key com.google.android.apps.work.clouddpc.EXTRA_LAUNCHED_AS_SETUP_ACTION set to the boolean value true to indicate that this is a setup action flow. If SetupAction references an app, the corresponding installType in the application policy must be set as REQUIRED_FOR_SETUP or said setup will fail.
        "packageName": "A String", # Package name of app to be launched
      },
      "title": { # Provides a user-facing message with locale info. The maximum message length is 4096 characters. # Title of this action.
        "defaultMessage": "A String", # The default message displayed if no localized message is specified or the user's locale doesn't match with any of the localized messages. A default message must be provided if any localized messages are provided.
        "localizedMessages": { # A map containing pairs, where locale is a well-formed BCP 47 language (https://www.w3.org/International/articles/language-tags/) code, such as en-US, es-ES, or fr.
          "a_key": "A String",
        },
      },
    },
  ],
  "shareLocationDisabled": True or False, # Whether location sharing is disabled. share_location_disabled is supported for both fully managed devices and personally owned work profiles.
  "shortSupportMessage": { # Provides a user-facing message with locale info. The maximum message length is 4096 characters. # A message displayed to the user in the settings screen wherever functionality has been disabled by the admin. If the message is longer than 200 characters it may be truncated.
    "defaultMessage": "A String", # The default message displayed if no localized message is specified or the user's locale doesn't match with any of the localized messages. A default message must be provided if any localized messages are provided.
    "localizedMessages": { # A map containing pairs, where locale is a well-formed BCP 47 language (https://www.w3.org/International/articles/language-tags/) code, such as en-US, es-ES, or fr.
      "a_key": "A String",
    },
  },
  "skipFirstUseHintsEnabled": True or False, # Flag to skip hints on the first use. Enterprise admin can enable the system recommendation for apps to skip their user tutorial and other introductory hints on first start-up.
  "smsDisabled": True or False, # Whether sending and receiving SMS messages is disabled.
  "statusBarDisabled": True or False, # Whether the status bar is disabled. This disables notifications, quick settings, and other screen overlays that allow escape from full-screen mode. DEPRECATED. To disable the status bar on a kiosk device, use InstallType KIOSK or kioskCustomLauncherEnabled.
  "statusReportingSettings": { # Settings controlling the behavior of status reports. # Status reporting settings
    "applicationReportingSettings": { # Settings controlling the behavior of application reports. # Application reporting settings. Only applicable if application_reports_enabled is true.
      "includeRemovedApps": True or False, # Whether removed apps are included in application reports.
    },
    "applicationReportsEnabled": True or False, # Whether app reports are enabled.
    "commonCriteriaModeEnabled": True or False, # Whether Common Criteria Mode reporting is enabled.
    "deviceSettingsEnabled": True or False, # Whether device settings reporting is enabled.
    "displayInfoEnabled": True or False, # Whether displays reporting is enabled. Report data is not available for personally owned devices with work profiles.
    "hardwareStatusEnabled": True or False, # Whether hardware status reporting is enabled. Report data is not available for personally owned devices with work profiles.
    "memoryInfoEnabled": True or False, # Whether memory event reporting is enabled.
    "networkInfoEnabled": True or False, # Whether network info reporting is enabled.
    "powerManagementEventsEnabled": True or False, # Whether power management event reporting is enabled. Report data is not available for personally owned devices with work profiles.
    "softwareInfoEnabled": True or False, # Whether software info reporting is enabled.
    "systemPropertiesEnabled": True or False, # Whether system properties reporting is enabled.
  },
  "stayOnPluggedModes": [ # The battery plugged in modes for which the device stays on. When using this setting, it is recommended to clear maximum_time_to_lock so that the device doesn't lock itself while it stays on.
    "A String",
  ],
  "systemUpdate": { # Configuration for managing system updatesNote: Google Play system updates (https://source.android.com/docs/core/ota/modular-system) (also called Mainline updates) are automatically downloaded but require a device reboot to be installed. Refer to the mainline section in Manage system updates (https://developer.android.com/work/dpc/system-updates#mainline) for further details. # The system update policy, which controls how OS updates are applied. If the update type is WINDOWED, the update window will automatically apply to Play app updates as well.Note: Google Play system updates (https://source.android.com/docs/core/ota/modular-system) (also called Mainline updates) are automatically downloaded and require a device reboot to be installed. Refer to the mainline section in Manage system updates (https://developer.android.com/work/dpc/system-updates#mainline) for further details.
    "endMinutes": 42, # If the type is WINDOWED, the end of the maintenance window, measured as the number of minutes after midnight in device's local time. This value must be between 0 and 1439, inclusive. If this value is less than start_minutes, then the maintenance window spans midnight. If the maintenance window specified is smaller than 30 minutes, the actual window is extended to 30 minutes beyond the start time.
    "freezePeriods": [ # An annually repeating time period in which over-the-air (OTA) system updates are postponed to freeze the OS version running on a device. To prevent freezing the device indefinitely, each freeze period must be separated by at least 60 days.
      { # A system freeze period. When a device’s clock is within the freeze period, all incoming system updates (including security patches) are blocked and won’t be installed.When the device is outside any set freeze periods, the normal policy behavior (automatic, windowed, or postponed) applies.Leap years are ignored in freeze period calculations, in particular: If Feb. 29th is set as the start or end date of a freeze period, the freeze period will start or end on Feb. 28th instead. When a device’s system clock reads Feb. 29th, it’s treated as Feb. 28th. When calculating the number of days in a freeze period or the time between two freeze periods, Feb. 29th is ignored and not counted as a day.Note: For Freeze Periods to take effect, SystemUpdateType cannot be specified as SYSTEM_UPDATE_TYPE_UNSPECIFIED, because freeze periods require a defined policy to be specified.
        "endDate": { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: A full date, with non-zero year, month, and day values. A month and day, with a zero year (for example, an anniversary). A year on its own, with a zero month and a zero day. A year and month, with a zero day (for example, a credit card expiration date).Related types: google.type.TimeOfDay google.type.DateTime google.protobuf.Timestamp # The end date (inclusive) of the freeze period. Must be no later than 90 days from the start date. If the end date is earlier than the start date, the freeze period is considered wrapping year-end. Note: year must not be set. For example, {"month": 1,"date": 30}.
          "day": 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.
          "month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
          "year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
        },
        "startDate": { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: A full date, with non-zero year, month, and day values. A month and day, with a zero year (for example, an anniversary). A year on its own, with a zero month and a zero day. A year and month, with a zero day (for example, a credit card expiration date).Related types: google.type.TimeOfDay google.type.DateTime google.protobuf.Timestamp # The start date (inclusive) of the freeze period. Note: year must not be set. For example, {"month": 1,"date": 30}.
          "day": 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.
          "month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
          "year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
        },
      },
    ],
    "startMinutes": 42, # If the type is WINDOWED, the start of the maintenance window, measured as the number of minutes after midnight in the device's local time. This value must be between 0 and 1439, inclusive.
    "type": "A String", # The type of system update to configure.
  },
  "tetheringConfigDisabled": True or False, # Whether configuring tethering and portable hotspots is disabled. If tetheringSettings is set to anything other than TETHERING_SETTINGS_UNSPECIFIED, this setting is ignored.
  "uninstallAppsDisabled": True or False, # Whether user uninstallation of applications is disabled. This prevents apps from being uninstalled, even those removed using applications
  "unmuteMicrophoneDisabled": True or False, # If microphone_access is set to any value other than MICROPHONE_ACCESS_UNSPECIFIED, this has no effect. Otherwise this field controls whether microphones are disabled: If true, all microphones are disabled, otherwise they are available. This is available only on fully managed devices.
  "usageLog": { # Controls types of device activity logs collected from the device and reported via Pub/Sub notification (https://developers.google.com/android/management/notifications). # Configuration of device activity logging.
    "enabledLogTypes": [ # Specifies which log types are enabled. Note that users will receive on-device messaging when usage logging is enabled.
      "A String",
    ],
    "uploadOnCellularAllowed": [ # Specifies which of the enabled log types can be uploaded over mobile data. By default logs are queued for upload when the device connects to WiFi.
      "A String",
    ],
  },
  "usbFileTransferDisabled": True or False, # Whether transferring files over USB is disabled. This is supported only on company-owned devices.
  "usbMassStorageEnabled": True or False, # Whether USB storage is enabled. Deprecated.
  "version": "A String", # The version of the policy. This is a read-only field. The version is incremented each time the policy is updated.
  "vpnConfigDisabled": True or False, # Whether configuring VPN is disabled.
  "wifiConfigDisabled": True or False, # Whether configuring Wi-Fi networks is disabled. Supported on fully managed devices and work profiles on company-owned devices. For fully managed devices, setting this to true removes all configured networks and retains only the networks configured using openNetworkConfiguration. For work profiles on company-owned devices, existing configured networks are not affected and the user is not allowed to add, remove, or modify Wi-Fi networks. If configureWifi is set to anything other than CONFIGURE_WIFI_UNSPECIFIED, this setting is ignored. Note: If a network connection can't be made at boot time and configuring Wi-Fi is disabled then network escape hatch will be shown in order to refresh the device policy (see networkEscapeHatchEnabled).
  "wifiConfigsLockdownEnabled": True or False, # DEPRECATED - Use wifi_config_disabled.
}