{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/google-android/json-schema/google-android-app-restrictions-schema-schema.json",
  "title": "AppRestrictionsSchema",
  "description": "Represents the list of app restrictions available to be pre-configured for the product.",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/google-android-androidenterprise-products-api-openapi.yml#/components/schemas/AppRestrictionsSchema",
  "properties": {
    "kind": {
      "description": "Deprecated.",
      "type": "string"
    },
    "restrictions": {
      "type": "array",
      "description": "The set of restrictions that make up this schema.",
      "items": {
        "$ref": "#/$defs/AppRestrictionsSchemaRestriction"
      }
    }
  },
  "type": "object",
  "$defs": {
    "AppRestrictionsSchemaRestriction": {
      "properties": {
        "nestedRestriction": {
          "type": "array",
          "description": "For bundle or bundleArray restrictions, the list of nested restrictions. A bundle restriction is always nested within a bundleArray restriction, and a bundleArray restriction is at most two levels deep.",
          "items": {
            "$ref": "#/$defs/AppRestrictionsSchemaRestriction"
          }
        },
        "entryValue": {
          "description": "For choice or multiselect restrictions, the list of possible entries' machine-readable values. These values should be used in the configuration, either as a single string value for a choice restriction or in a stringArray for a multiselect restriction.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "defaultValue": {
          "$ref": "#/$defs/AppRestrictionsSchemaRestrictionRestrictionValue",
          "description": "The default value of the restriction. bundle and bundleArray restrictions never have a default value."
        },
        "title": {
          "type": "string",
          "description": "The name of the restriction."
        },
        "key": {
          "type": "string",
          "description": "The unique key that the product uses to identify the restriction, e.g. \"com.google.android.gm.fieldname\"."
        },
        "description": {
          "type": "string",
          "description": "A longer description of the restriction, giving more detail of what it affects."
        },
        "restrictionType": {
          "type": "string",
          "description": "The type of the restriction.",
          "enum": [
            "bool",
            "string",
            "integer",
            "choice",
            "multiselect",
            "hidden",
            "bundle",
            "bundleArray"
          ]
        },
        "entry": {
          "type": "array",
          "description": "For choice or multiselect restrictions, the list of possible entries' human-readable names.",
          "items": {
            "type": "string"
          }
        }
      },
      "description": "A restriction in the App Restriction Schema represents a piece of configuration that may be pre-applied.",
      "type": "object"
    },
    "AppRestrictionsSchemaRestrictionRestrictionValue": {
      "properties": {
        "type": {
          "type": "string",
          "description": "The type of the value being provided.",
          "enum": [
            "bool",
            "string",
            "integer",
            "choice",
            "multiselect",
            "hidden",
            "bundle",
            "bundleArray"
          ]
        },
        "valueString": {
          "type": "string",
          "description": "The string value - this will be present for types string, choice and hidden."
        },
        "valueBool": {
          "type": "boolean",
          "description": "The boolean value - this will only be present if type is bool."
        },
        "valueMultiselect": {
          "description": "The list of string values - this will only be present if type is multiselect.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "valueInteger": {
          "format": "int32",
          "description": "The integer value - this will only be present if type is integer.",
          "type": "integer"
        }
      },
      "type": "object",
      "description": "A typed value for the restriction."
    }
  }
}